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 111.111.111.111).

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

"%username%"
"password"
cd /upload
bin
hash
put/get "filename.cab"
bye

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.

Advertisements

Microsoft removing support for Windows Vista SP1

Microsoft will stop support for Vista SP 1 on 12 July 2011. This means that after that date no further updates, e.g. security patches, will be made available.

Customers are being strongly advised to upgrade their Windows Vista clients to service pack 2 which is freely available from Microsoft. For more information about how to install service pack for Windows Vista please refer to Microsoft’s Learn how to install Windows Vista Service Pack 2 SP2 page.