Solved

Batch File: WGET to fully mirror FTP site

Posted on 2011-09-02
3
1,608 Views
Last Modified: 2012-08-13
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.

REF: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_27287357.html?cid=1575#a36473643

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

Thanks for your help,
Rene

 
wget.exe -m --passive -P LocalFolder ftp://username:password@domainname.com:1111

Open in new window

0
Comment
Question by:ReneGe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Assisted Solution

by:vk3kjc
vk3kjc earned 250 total points
ID: 36477448
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.
0
 
LVL 55

Accepted Solution

by:
Bill Prew earned 250 total points
ID: 36477634
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.

http://www.itefix.no/i2/node/10650

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.

http://www.scootersoftware.com/

~bp
0
 
LVL 10

Author Closing Comment

by:ReneGe
ID: 36477800
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.

Cheers,
Rene
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question