Batch file FTP help

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.
3 answers Last reply
More about batch file help
  1. 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.
  2. 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.
  3. 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.
Ask a new question

Read More

Programming Download FTP Command Prompt Apps