I understand a little on batch programming and write simple batch file.
Right now I have this kind interest on how I can automate my file transfer from FTP server to local folder in my PC using a batch file
This is the command I am always using at my CMD prompt.:
c:\>ftp 10.611.xxx.yyy
Connected to 10.611.xxx.yyy
220 wpxxxgb FTP server (version 1.1.214.4(PHNE_xxxxx) Thu Nov 20 06 06:40:06 GMT 2003) ready.
User (10.611.xxx.yyy:(none)):username - I type in my "username"
331 Password required for username
Password: - type in my password
230 User username logged in.
ftp>
ftp>cd 1103/ar/10.0.23/out - the directory where the data located
250 CWD command successful
ftp>binary
200 Type set to I.
ftp> mget *4035584* - the files I want to get
200 Type set to I
mget EMP057.40xxxx?y
200 PORT command successful
150 Opening BINARY mode data connection for EMP057.40xxxx (29804 byte)
226 Transfer complete.
ftp. 29804 bytes received in 0.69seconds 43.45 Kbytes/sec.
ftp>bye
221 Goodbye.
c:\>
How to I attache the username and password to the ftp command?
Hope you can give tips. Thanks
Then after getting the file, I will move it to the folder d:\DATA\INVOICE
Howto create a batch file that will get file from FTP serve....
Moderator: DosItHelp
-
- Posts: 1
- Joined: 23 Oct 2018 04:04
Re: Howto create a batch file that will get file from FTP serve....
We have a whole tutorial on that.
https://www.dostips.com/DtTipsFtpBatchScript.php
https://www.dostips.com/DtTipsFtpBatchScript.php