I am trying to set up an automatic download of the files from a FTP directory on a scheduled basis. The solution I have come up with is to create a batch file that will be ran by windows task scheduler. The batch file is as follows (so far)
prompt
open ftp://xx.xx.xx.xx
myuser
mypassword
lcd C:\localdir
cd /remotedir/
mget *
quit
The problem is that this does not get everything in the specified directory. Only the loose files in the directory such as a .zip
or .txt
file. I have searched the questions here to no avail. So how can I get mget
to not only download loose files in the root directory but also download the sub-directories and containing files (keeping the structure intact)?