FTP scripts for Windows

I found this Microsoft KB article today which shows you how to use the ftp program that comes with all versions of Windows to automate a file transfer. I normally use FireFTP (a Firefox plugin), but I was trying to sort a way to just throw up a file quickly without needing to do the whole boot and login process.

You will run the following command prompt:

ftp -s:ftpscript.txt YOUR_FTP_SERVER 

Replacing YOUR_FTP_SERVER with either the URL or IP of your FTP server (ie replace YOUR_FTP_SERVER with ftp.server.com or

With the contents of ftpscript.txt looking something like this:

cd /upload
put/get "filename.cab"

You will need to replace your username and password as appropriate, and also select whether to use put OR get (NOT both).

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 as follows:

ftp -n -s:ftpscript.txt YOUR_FTP_SERVER 

This is handy for administration between servers, but keep in mind that FTP sends passwords in clear text, so security is not looked after.


About Cameron
I'm a final year Computer Science/Information Systems major. Already finished my BA in Politics/Philosophy. I do web and software freelance on the side, while I finish studying. Hoping to be self-employed by the end of my degree, otherwise off into the real-world I go....

One Response to FTP scripts for Windows

  1. Pingback: Tweets that mention FTP scripts for Windows « whileloop -- Topsy.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: