Batch File: WGET to fully mirror FTP site

Hi there,

With WGET, I was able to mirror from the FTP site. However, when I delete a file at the FTP site, it is not deleted at the local folder.


I need to use WGET to fully mirror an FTP site.

Thanks for your help,

wget.exe -m --passive -P LocalFolder

Open in new window

LVL 10
Who is Participating?
Bill PrewConnect With a Mentor Commented:
Agreed, it looks like WGET doesn't support that, so it's really not a true option for that type of mirroring sync.

If you want to explore another option, take a look at CWRSYNC at the link below.  I use this for some local server sync activities, but getting the command line right can take a bit of trial and error. And the server you are connecting to has to support the rsync command.

Also, FWIW, I live by Beyond Compare, and happily pay it's cost. I don't typically use it for batch sync type things though, I use it for two file "diff and merge" type activities with a UI. It's a great tool for comparing two files, or two folder structures and identifying differences.

vk3kjcConnect With a Mentor Commented:
The version that I use does not have that capability although I do have vague recollections of an older (Unix?) version doing it. I remember the frustration at it deleting files if the FTP connection failed for some reason and it did not find the file on the server.

I now use rsync, which does have a --delete option, between servers or if I am in a Windows environment, I use relatively inexpensive commercial software (Beyond Compare).

If you you only have FTP access to the source data, the only option with wget might be to delete all the files and download them all again.
ReneGeAuthor Commented:
Thanks a million to you both.

You just saved me a lot of time  ;-)

If I need help for using the refered apps, I'll open new questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.