How to login in FTP (Client) from batch?

N

niladri chatterjee

How to login in FTP (Client) from batch? This works interactively from CMD
but cannot login from batch.

My batch file is as follows:-

cd c:\file_copy
del /f /q C:\file_copy\*.*
ftp -i
open 172.xx.0.yy
login-name
password
mGET *PACKSLIP.DOC;*
mGET *CONFIRMPRNT_CSVC.DOC;*
bye
copy /y C:\file_copy\*PACKSLIP.DOC R:\PDFS\PACKING_SLIP
copy /y C:\file_copy\*CONFIRMPRNT_CSVC.DOC R:\PDFS\R:\PDFS\CONFIRMPRNT_CSVC
del /f /q C:\file_copy\*.*
 
G

Gary

Take a look at the -s option. I have a batch file that runs M-F this way.
ftp -s:ftpfile.txt
ftpfile.txt
open ip-addr
username
password
other commands
bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top