Sign in with
Sign up | Sign in
Your question

Batch file FTP help

Last response: in Apps General Discussion
Share
September 27, 2011 5:20:14 PM

I am writing a batch file that will download a file from an ftp site. I have written batch files before but am new to the FTP side of it. Here is what I have so far.
echo open ipaddress 950>>ftpbat.txt
echo anonymous>>ftpbat.txt
echo batscript@pccaresupport.com>>ftpbat.txt
echo binary>>ftpbat.txt
echo prompt n>>ftpbat.txt
echo mget file.msi>>ftpbat.txt
echo bye>>ftpbat.txt
ftp -s:ftpbat.txt
del ftpbat.txt

it connects to the ftp site correctly and logs in but when it tries to run the mget command I get an error "Invalid PORT Command." I have no idea what to do with this.

More about : batch file ftp

September 29, 2011 2:54:43 PM

travishendrix said:
I am writing a batch file that will download a file from an ftp site. I have written batch files before but am new to the FTP side of it. Here is what I have so far.
echo open ipaddress 950>>ftpbat.txt
echo anonymous>>ftpbat.txt
echo batscript@pccaresupport.com>>ftpbat.txt
echo binary>>ftpbat.txt
echo prompt n>>ftpbat.txt
echo mget file.msi>>ftpbat.txt
echo bye>>ftpbat.txt
ftp -s:ftpbat.txt
del ftpbat.txt

it connects to the ftp site correctly and logs in but when it tries to run the mget command I get an error "Invalid PORT Command." I have no idea what to do with this.



probably caused by your firewall setting. Both the firewall NAT and FTP service are redirecting Same Port ?? at the same time confusing the system.
Deleting the firewall NAT setting may cure the problem.
m
0
l
December 29, 2011 6:06:06 PM

You might consider www.thruinc.com because it enables you to send and receive batches of any size just like a regular email without any code writing. Saves a lot of time.
m
0
l
December 29, 2011 6:43:20 PM

nxb3942 said:
You might consider www.thruinc.com because it enables you to send and receive batches of any size just like a regular email without any code writing. Saves a lot of time.


Op didn't respond to my Sept post, so doubtful he will read yours also ! :lol: 

We get these hit & runs all the time.
m
0
l
!