bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Get Newest File Only?


From: Micah Cowan
Subject: Re: [Bug-wget] Get Newest File Only?
Date: Thu, 12 Feb 2009 12:09:50 -0800
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Robert P Dale wrote:
>>> to check each and every file. Is there a way to tell it to just compare
>>> what's newest on the server and compare to my local side?
>> Are you asking whether there's a way to ask the server, "What are the
>> newest files, so I can check whether they're newer than what I have"? If
>> so, then no.
> 
> Not necessarily -- I just want wget to output "last filename on that list"
> and then do the comparison... I guess the comparable thing "manually" would
> be to download the directory listing, strip out the last file with awk or
> something related, and then use wget to do a "-N" and download it if that
> file doesn't exist locally.

"Last filename"? Doesn't that assume that they're sorted by modification
time? And what if more than one file are newer than what you have? You
need to check the next file up the list. And what if a directory has not
been modified recently, but a file somewhere within it has been?

But of course Wget has no way to get such a list of files in the first
place. True, http://foo/index.html might be such a list; then again, it
might not be. There is no way, apart from fairly silly heuristics, for
Wget to tell.

-mjc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]