Click here for important information about

FTP Batch file

Microsoft Windows xp professional w/serv...
April 14, 2010 at 09:30:47
Specs: Windows XP
I want to setup a batch file to connect to different ftp sites and download files to individual folders. Right now I'm trying to use "ftp -s:DosFtpFile.ftp" inside a batch file, and use "user_name, password, prompt, mget *, quit" inside of the dosftpfile.ftp file. It works for the first one, but then stops.

See More: FTP Batch file

April 14, 2010 at 17:40:08
remove the servername from your commandline, just do:
ftp -s ftpfile
and in the ftpscriptfile:
open servername1
mget *
open servername2
mget *
one set of open..disconnects for each server, and add other commands as needed within each subset (cd, binary etc).

Report •

April 14, 2010 at 23:51:16
>ftpscript.txt echo open %2
>>ftpscript.txt echo %user%
>>ftpscript.txt echo %password%
>>ftpscript.txt echo ascii
>>ftpscript.txt echo cd %3
>>ftpscript.txt echo get %4
>>ftpscript.txt echo bye

ftp -s:ftpscript.txt

Try by doing like this. It works

Report •

April 15, 2010 at 05:13:07
No point in setting ascii.

Helping others achieve escape felicity


Report •

Related Solutions

April 16, 2010 at 03:17:39
> No point in setting ascii.

Programming clarity

Report •

May 3, 2010 at 15:54:34
ok. I've got the file running. It goes to multiple ftp sites. It downloads the files I want, puts their name into a text file, deletes them from the ftp site, and moves on. Thanks for the help.

Report •

Ask Question