[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wget
Subject:    Windows WGET 1.10.2 - two bugs
From:       David MacMillan <dcm-wget () capital-ideas ! com>
Date:       2007-05-06 6:44:59
Message-ID: 463D796B.2030502 () capital-ideas ! com
[Download RAW message or body]

Re: Windows Wget 1.10.2 - two bugs

Bug 1) Wget's manual says as shown below, but Windows Wget does not 
generate the file.1 and file2. - it just overwrites.

To reproduce the problem:
WGet -S -N http://www.pjm.com/pub/account/lmpgen/lmppost.html

Wget will keep overwriting the local file each time the web page's 
timestamp updates, rather than creating numbered versions.

from manual:
-nc
--no-clobber
     If a file is downloaded more than once in the same directory, 
Wget's behavior depends on a few options, including -nc. In certain 
cases, the local file will be clobbered, or overwritten, upon repeated 
download. In other cases it will be preserved.

     When running Wget without -N, -nc, or -r, downloading the same file 
in the same directory will result in the original copy of file being 
preserved and the second copy being named file.1. If that file is 
downloaded yet again, the third copy will be named file.2, and so on. 
When -nc is specified, this behavior is suppressed, and Wget will refuse 
to download newer copies of file. Therefore, "no-clobber" is actually a 
misnomer in this mode--it's not clobbering that's prevented (as the 
numeric suffixes were already preventing clobbering), but rather the 
multiple version saving that's prevented.

     When running Wget with -r, but without -N or -nc, re-downloading a 
file will result in the new copy simply overwriting the old. Adding -nc 
will prevent this behavior, instead causing the original version to be 
preserved and any newer copies on the server to be ignored.

     When running Wget with -N, with or without -r, the decision as to 
whether or not to download a newer copy of a file depends on the local 
and remote timestamp and size of the file (see Time-Stamping.). -nc may 
not be specified at the same time as -N.

     Note that when -nc is specified, files with the suffixes .html or 
.htm will be loaded from the local disk and parsed as if they had been 
retrieved from the Web.

---

Bug 2) (Sort of a bug - or a feature request) Normal Windows protocol is 
to have an ERRORLEVEL returned, whose value indicates program success or 
failure. WGET is not doing this - in the above example, the ERRORLEVEL 
is the same for the two cases of retrieving an updated page and not 
retrieving an updated page (i.e. page is unchanged). This makes it 
impossible to build a batch file whose behavior is conditional on a new 
file being downloaded.

---

Otherwise a great program. Very useful.

David MacMillan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic