I'm trying to execute the following batch script to copy file from ftp to local directory. However, I'm only able to login to the ftp but can't get the rest (bold code) of the script to execute. The script hangs at ftp> prompt.
ftp -i -n -v ftp.domain.com
quote 'User'
quote 'Password'
**cd /iatest
mget * C:\local\directory
pause**
Can someone please help? Thank you.
Got it to work. A couple of items for newbies like me: You need to two scripts to execute the task as following:
Script 1 (scriptname.bat): To call the .bat script with your code to execute.
ftp -i -n -s:yourscript.bat
Script 2: Actual code you want to execute which in my case is to copy files from ftp to specific local directory.
open ftp.domain.com
user username
password
cd /ftpDirectoryYouNeedToCopyFrom
lcd C:\DirectoryYouWantToCopyInto
mget *
bye
Here is a good reference: http://www.youtube.com/watch?v=2YJMcns0ILk