Skip to main content


Showing posts from April, 2011

FTP Script from the command line

For the longest time I have always used wget to handle command line ftp downloads.For one particular download I was doing wget stopped working with wildcards.  Probably something to do with the server I was connecting to.I started researching and found a cool windows batch file to do this:Windows server 2003 and Windows XP – How to script file download from FTP serverHere is the script from the example altered for my needs.@echo off
echo user MyUserName> ftpcmd.dat
echo MyPassword>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo prompt>>ftpcmd.dat
echo cd IDX>>ftpcmd.dat
echo mget pics-*-2*.tar>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat SERVERNAME.COM
del ftpcmd.dat