Posted By

jimfred on 12/08/08


FTP dos wget

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


ftp from the command line - similar to wget

 / Published in: DOS Batch

ftp from the command line - Here's an example, similar to a wget, all on one line but broken into several lines here for readability:

Commands are delimited using DOS/Window's &. Optionally, the first command could be a del File.txt.

The echo commands create a temporary file, ftpcmd.txt, with three commands:

  1. lcd (a local cd to change the local directory),
  2. a get command to perform the file transfer
  3. a quit to exit from the ftp prompt

ftp's command line parameters:

  1. -A login anonymously
  2. -s specifies a command file
  3. optional -n and -v suppress printed messages
  4. ...and the ftp server's ip address.
  1. echo lcd c:\DestDir > ftpcmd.txt &
  2. echo get File.txt >> ftpcmd.txt &
  3. echo quit >> ftpcmd.txt &
  4. ftp -A -s:ftpcmd.txt -n -v
  6. Rem similar to wget

Report this snippet  


RSS Icon Subscribe to comments
Posted By: hemanthhm on January 11, 2009

More tips and tricks ::

You need to login to post a comment.