wget return values ?

2005-03-01 Thread seb_kramm
Hi all,
I'm new here, and intend to use wget under Windows, through cmd scripts (.bat).
I'm quite surprised to have nothing in the documentation about the wget return value. 
How can the script know if the page it's trying to fetch is existent or not ?

If there is no significant return value, I can't test it (through %errorlevel% under 
windows), and in that case, I would have to do a parsing of the text outputed, wich 
would'nt be very convenient !

Is it just 0-success/1-failure, or maybe wget returns the http error code ?
Thank you.


Re: Large file problem

2005-03-01 Thread Hrvoje Niksic
Gisle Vanem [EMAIL PROTECTED] writes:

 It doesn't seem the patches to support 2GB files works on
 Windows. Wget hangs indefinitely at the end of transfer.  E.g.
[...]

I seem to be unable to repeat this.

Does this happen with only with large files, or with all files on
large-file-enabled version of Wget?  Does it happen only for FTP
downloads or for HTTP as well?


RE: wget return values ?

2005-03-01 Thread Leonid
Seb_kramm,
 Is it just 0-success/1-failure,
  So far, for many cases it is just that.
 How can the script know if the page it's trying to fetch is existent 
or not ?

  If wget retunred code 0, this means the page is downloaded, therefore,
it exists. :-) If it returned code 1, the page is not downloaded.
Does your script really need to know _why_ wget failed: because of
wrong URL or because the remote URL was down and wget exceeded the
number of retrying attempts? I agree it would be nice to have this
feature in wget, but in fact there may be miriad of reasons: wrong
URL, unreachable host, permission denied, local filesystem full,
no permission to write in local directory, etc, so this may not
be as usefull as it seems.
Leonid (just another user)


RE: wget return values ?

2005-03-01 Thread Jim Wright
Unfortunately, in some cases at least, wget return codes are nearly
meaningless.  When trying to mirror an ftp site for example, the return
code appears to only indicate if the server could be contacted and has
nothing to do with the success of the requested operation.

The situation is probably better for single file retrieval, but for
mirroring the return codes are not helpful.

Jim


On Tue, 1 Mar 2005, Leonid wrote:

 Seb_kramm,
 
  Is it just 0-success/1-failure,
 
   So far, for many cases it is just that.
 
  How can the script know if the page it's trying to fetch is existent or not
 ?
 
   If wget retunred code 0, this means the page is downloaded, therefore,
 it exists. :-) If it returned code 1, the page is not downloaded.
 Does your script really need to know _why_ wget failed: because of
 wrong URL or because the remote URL was down and wget exceeded the
 number of retrying attempts? I agree it would be nice to have this
 feature in wget, but in fact there may be miriad of reasons: wrong
 URL, unreachable host, permission denied, local filesystem full,
 no permission to write in local directory, etc, so this may not
 be as usefull as it seems.
 
 Leonid (just another user)