Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to create a scheduled task in windows, that connects to an FTP site, and downloads all the files and folders within the root directory (or specified folders in the root directory) - for example \httdocs and \subdomains to a local directory?

I figure it must be possible, however i can't quite think of the syntax....

This is to backup my website, to the local drive - i edit and upload content to it (it's wordpress) from various sources.

share|improve this question
@alex: as per your comment for @djhowell: click RUN > cmd ... type in ftp ... see what happens ... if you get ftp> prompt - your script should work just fine ... if not - you don't have c:\windows\server32 n your path – roman m Nov 13 '09 at 9:03
up vote 1 down vote accepted

See my question for the correct script; thanks @djhowell - your script got me started:

Here's the working script:

lcd C:\Temp\OrWhatever
cd /DirectoryOnFtpServer
mget *.*

lcd - change LOCAL directory
cd - change REMOTE directory
mget *.* - get all files in directory

share|improve this answer

Yes, it's possible using scripting mode (ftp -s). Put something like this in a .BAT file:

ftp -s:MyFTP.txt

And then create a MyFTP.txt file in the same path that contains something like this:

lcd C:\Backup
mget *

Or specify multiple directories like

mget httdocs\*
mget subdomains\*
share|improve this answer
i tried this, when i execute the bat file, it just prints ftp -s:MyFTP.txt over and over..... it doesn't seem to try and connect.... – alex Oct 8 '09 at 21:17
Don't call your batch file "ftp.bat", because windows doesn't know whether to call ftp.bat or ftp.exe. Name your batch file something like "ftpfiles.bat". thread necro FTW! – user79043 Apr 29 '11 at 21:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.