Challenge:
I need to pull over a file from our FTP server every minute to the database server. I do not want to install any FTP schedule utilities on the database server. So I decided to use the FTP.exe comes with the Windows server OS. I brought up a DOS prompt, type FTP and hit Enter. I got some prompt screens, what I needed to do is to provide the remote server IP (host name) and user credential information. After I logged on, I then can use some UNIX like commands as LS and GET to download files. Great, it approved that we really do not need a fancy FTP client program.
But how can I make the above process automatically, since I could not put user logon credentials into a DOS batch file.
Research Results:
To overcome the challenge above, I need to come up an FTP “script” which can work together with FTP in DOS, since FTP.exe supports scripting with the “-s:” option.
For example, if your plain text FTP script file has a name of FTPSCRIPT.TXT (assume you put the same directory as you type your DOS command), then you can use the following command to execute FTP script:
ftp -s:FTPSCRIPT.TXT
Continue reading ‘Make a free auto get/put files schedule with FTP scripts in DOS environment’
I
Blog Comments