cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using list {} does not work with -z to download only newer files

From: Gustav Axelsson <gustav.axelsson_at_gmail.com>
Date: Fri, 21 Apr 2006 09:22:40 +0200

I'm having problems when I download multiple files and only want to
download those files that are newer than the ones already present on
the harddrive.

If I download the files one by one instead of using a list they are
not downloaded unless a newer copy exists on the server:

curl -R --user-agent tv.swedb.se.widget --compressed 'http://
tvguide.swedb.se/xmltv/svt1.svt.se_2006-04-20.xml.gz' -o ~/Library/
Xmltv/svt1.svt.se_2006-04-20.xml -z ~/Library/Xmltv/
svt1.svt.se_2006-04-20.xml

But if I use a list with only one item (the date 2006-04-20) the file
is always downloaded despite the fact that the server does not have a
more recent file.

curl -R --user-agent tv.swedb.se.widget --compressed 'http://
tvguide.swedb.se/xmltv/svt1.svt.se_{2006-04-20}.xml.gz' -o ~/Library/
Xmltv/svt1.svt.se_#1.xml -z ~/Library/Xmltv/svt1.svt.se_#1.xml

I thought that the two above commands, one hard coded and one using a
list { }, did the same thing. And they do the same thing (both
download the file I want) but the list-using one does not respect the
-z flag and I don't understand why that happens.

What I need to do is download about 150 files and I'd much prefer to
use one curl-invocation with a list than have to start 150 instances
of curl (one for each file). And since I'm downloading so many files,
I need to be able to skip those files that are already downloaded (by
using the -z flag) in order not to waste the bandwidth of the server.

Any insight in what I might be doing wrong would be most helpful.

I'm using curl 7.13.1 on a Mac.

Regards
Gustav Axelsson
Received on 2006-04-21