Windows server 2003 and Windows XP – How to script file download from FTP server
Posted by Mark | Posted in Scripting, Windows 2003, Windows XP | Posted on 22-07-2009
1
Do you know how to script basicĀ FTP server connect/copy operations?
I`ll show you that.
Lets assume you want every Friday at 06:00pm to connect to specific FTP server and download all files from it to directory named D:\Scanfiles.
On your Windows server 2003 or Windows XP start notepad and type:
@echo off
echo user username> ftpbat.dat
echo password>> ftpbat.dat
echo prompt>> ftpbat.dat
echo mget *.*>> ftpbat.dat
echo quit>> ftpbat.dat
ftp -n -s:ftpbat.dat FTPserverIP
del ftpbat.dat

Save file as ftp.bat and place it in D:\Scanfiles folder.
Change this data:
username – your ftp username
password – your ftp password
FTPserverIP – ip address of ftp server to connect
After that create new scheduled task to run ftp.bat file every Friday at 06:00pm .
Cheers!

