Transferring files from ftp to local system
Posted
by
Ramkrishnan
on Super User
See other posts from Super User
or by Ramkrishnan
Published on 2011-11-20T10:30:41Z
Indexed on
2012/07/04
3:18 UTC
Read the original article
Hit count: 159
I want to copy a file from FTP and save it to my local system. I want to run this through batch file. I am trying this for a week. But I couldn't find the solution. Anyone help me please....
This is my actual work
Want to copy a file named "Friday.bat" from ftp://172.16.3.132 (with username and password) So i use the below codings:
@echo off
@ftp -i -s:"%~f0"&GOTO:EOF
open 172.16.3.132
mmftp
((((pasword entered here)))))
binary
get Friday.bat
pause
Result:
ftp> @echo off
ftp> @ftp -i -s:"%~f0"&GOTO:EOF
Invalid command.
ftp> open 172.16.3.132
Connected to 172.16.3.132.
220 Welcome to ABL FTP service.
User (172.16.3.132:(none)):
331 Please specify the password.
230 Login successful.
ftp> binary
200 Switching to Binary mode.
ftp> get Friday.bat
200 PORT command successful. Consider using PASV.
550 Failed to open file.
ftp> pause
Finally, a file named Friday.bat is copied to my local system with 0 bytes and I am not able to open it
© Super User or respective owner