File Transfer Protcol (FTP) is a quick way to transfer files between two computers. There are many FTP software programs, both the pay and free varieties, available.
Windows® also includes a command line FTP program (ftp.exe).
In this
GUI world many shutter at the thought of a command line application, however this one does have its advantages. For starters it is already included in the OS and doesn’t need to be installed. I attempt to not over complicate things and keep them clean and uncluttered.
IMHO, the main advantage is the ability to process a text file that contains FTP commands. The parameter option to specify the text file to process is
-s (to see the other parameter options at the command prompt type
FTP -?).
This feature is advantageous because you can set up FTP batch files that perform various transfer actions without the need to click a number of buttons or type a number of commands. Login information can be included in the text file allowing access to those FTP locations that require user authentication. I have a number of batch files that I frequently use to transfer data. I have also set some up with the
Windows® task scheduler for unattended processing.
A batch file could look something like this:
ftp -s:somefile.txt
In the
somefile.txt file:
open 192.168.100.1
username
password
cd images
lcd images
send *.gif
The text file commands are passed a line at a time for processing. As displayed in the above example a username and password can also be passed, as those are typically the first two prompts after an FTP server connection is opened. The text file can contain any of the valid FTP commands (type
? at the
ftp> prompt for a list of valid commands). I tend to be brief in my postings but hopefully you can see the value in the ability to do this. If you have any additional input I’d love to hear it.
Labels: Apps, Code, How-To, Information, Misc, Tech