Using FTP Batch Scripts on Windows

Printer-friendly versionPDF version

The Microsoft KB article 96269 shows you how to use the ftp program that comes with all versions of windows to automate file transfer. You can use the -s option for passing FTP script to the program.

ftp -s:script.txt

The contents of script.txt might look like this:

open ftp.myserver.com
yourUserName
yourPassword
bin
cd /files
dele file.zip
put file.zip
bye

However, if the FTP host implements automatic login, this command will not work. To turn off automatic login, use the -n switch in the command line.

No votes yet