General discussion

Locked

FTP script

By k4k ·
on Win2k Pro i download files from a ftp Site every day using command prompt. i want to automate this task. the script should download the files from the given ftp site every day as sceduled. the script should also supply password for the anonynous account as blank ( or whatever the password is).

any solutions ?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

FTP script

by Joseph Moore In reply to FTP script

Yep, this is easy.
Say your FTP server is FTP.MYDOMAIN.COM and you want to get FILE1.TXT from it and download it to a local directory on your computer (c:\download). Say your username is BOB and the password is "PaSsWoRd".

First, make a TXT filewith the following contents:

open FTP.MYDOMAIN.COM
BOB
PaSsWoRd
binary
lcd c:/download
get FILE1.TXT
quit


Save that TXT file as DOWNLOAD.TXT and say you put it in the C:\WINNT directory.

You could then set up a Scheduled Job that would look as follows:

FTP -s:C:\WINNT\DOWNLOAD.TXT


Have the Scheduled Job run whenever you want.

The key is the -s switch with the FTP command. That says read the input file (in this case, DOWNLOAD.TXT), parse out each line of it and pump the lines into the FTP command shell.

hope this helps

Collapse -

FTP script

by k4k In reply to FTP script

Poster rated this answer

Collapse -

FTP script

by k4k In reply to FTP script

This question was closed by the author

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums