Howto create a batch file that will get file from FTP serve....

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Posts: 1
Joined: 23 Oct 2018 04:04

Howto create a batch file that will get file from FTP serve....

#1 Post by vietasdzxc » 23 Oct 2018 04:11

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.:

Connected to
220 wpxxxgb FTP server (version Thu Nov 20 06 06:40:06 GMT 2003) ready.
User ( - I type in my "username"
331 Password required for username
Password: - type in my password
230 User username logged in.
ftp>cd 1103/ar/10.0.23/out - the directory where the data located
250 CWD command successful
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.
221 Goodbye.

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

Post Reply