travishendrix

Distinguished
Oct 24, 2009
1
0
18,510
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.
 

ksiemb

Distinguished
Nov 15, 2009
154
0
18,660



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.
 

nxb3942

Distinguished
Dec 29, 2011
1
0
18,510
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.
 

ksiemb

Distinguished
Nov 15, 2009
154
0
18,660


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

We get these hit & runs all the time.