This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

Windows 95 and DOS - Batch FTP

SUMMARY: FTP multiple files simultaneously using the Windows 95 DOS prompt.

We use this trick to handle the MalekTips webpage - it is very useful!

Do you FTP a lot of files regularly? Do you maintain a website? If so, you can re-FTP the same files with a batch file using the Windows 95 DOS FTP command. Create a text file containing a list of your FTP commands. The first line must be your username, the second your password, and (optionally) the last line should be "quit." Now, when you invoke FTP from a DOS session, add " -s:batchfilename", substituting batchfilename with the name of the text file you created. Voila! Instant batch FTP session.

Here's a batch FTP session to the supposed domain idontknowwhere.com that gets three files and quits. The name of the text file in this example is 'batchgrab.' The command line for this example would be:

ftp -s:batchgrab idontknowwhere.com

The contents of 'batchgrab' could be as follows.

username
password
lcd c:\downloaddir
cd downloaddir
get file1.zip
get file2.zip
cd extras
get extrasfile1.zip
quit

Here's a batch FTP session to the supposed domain idontknowwhere.com that sends three files and quits. The name of the text file in this example is 'batchput.' The command line for this example would be:

ftp -s:batchput idontknowwhere.com

The contents of 'batchput' could be as follows.

username
password
lcd c:\webpage
cd www/html
put index.html
put site_map.html
cd contacts
put contact_list.html
quit


 

 

Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Windows 95 and DOS - Batch FTP

Standard disclaimer applies - read http://malektips.com/disclaim.html