Downloading multiple files, and specifying output filenames with wget

wget

Probably not with wget

perl

Something like ...

perl -MLWP::Simple -lane 'getstore($F[0],$F[1])' urls_and_filenames.txt

For Windows use " instead of '

curl

I note that curl has some options that might be relevant

-K, --config

Specify which config file to read curl arguments from.

--url

Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file.

This option may be used any number of times. To control where this URL is written, use the -o, --output or the -O, --remote-name options.

-o, --output <file>

Write output to instead of stdout. If you are using {} or [] to fetch multiple documents, you can use '#' followed by a number in the specifier. That variable will be replaced with the current string for the URL being fetched. Like in:

curl http://{one,two}.site.com -o "file_#1.txt"

or use several variables like:

curl http://{site,host}.host[1-5].com -o "#1_#2"

You may use this option as many times as the number of URLs you have.

Tags:

Wget