Page 1 of 1

Batch for Multiple FTP connections

Posted: 27 May 2009 22:50
by ITquest
i need to create a batch file that can connect to multiple ftp servers to extract a file to one location. Not sure if this is possible but i was thinking in terms of using variables to list the multiple ip address and file location if required. I havent used variables before in batch files.. any assistance will be great

this is what i've come up with so far.. it basically gets the files from only the one server and location provided

@ftp -i -s:"%~f0"&GOTO:EOF

!Title Connecting...
open server
username
password


!:--- FTP command below here ---

!Title Preparing...
lcd c:\MyLocalDirectory
cd public_html/

binary
mget "*.*"


!Title Disconnecting...
disconnect
bye