wget filename and directory name clashes

2

We are using WGET 1.12 for windows on a site (with follow_tags = a, reclevel = 8, recursive = on and timestamping = on wgetrc settings) and are seeing two issues:

a. The file is deleted and a directory with the same name is created. The original file is lost.

For eg.
URL:

http://some_site/abc

is saved as file:

some_dir/abc

And then…

URL:

http://some_site/abc/def

is saved as file:

some_dir/abc/def

Here the file ‘abc’ which was earlier created is deleted and instead a directory with the name ‘abc’ is created. The ‘abc’ directory contains the ‘def’ file but the original ‘abc’ file is lost

b. The file is not deleted and an error is thrown instead

For eg.

URL:

http://some_site/xyz/2006

is saved as file:

some_dir/xyz/2006

And then…

URL:

http://some_site/xyz/2006/12/aaa

is NOT saved. It gives an error. And it doesn’t delete the previously created 2006 file.

Error: some_dir/xyz/2006/12: No such file or directory

Is anyone aware of any such issues with WGET? Or is there some issue with my config parameters? Please let me know if you need more information. Thanks for your help.

Regards, Nike

Nike

Posted 2012-10-22T12:32:50.623

Reputation: 21

Answers

3

Old question, but ended here with a search relating to the issue of having a file saved which has the same name as the directory of assets.

Eventually found the solution for me here: https://lists.gnu.org/archive/html/bug-wget/2010-07/msg00083.html

Using -E solved my problem.

thunder

Posted 2012-10-22T12:32:50.623

Reputation: 131