Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using wget with the -i option to download a list of files from a URL.

However, I want to specify the names that these files will be saved with as well.

I see you can do that with a single file using -O, and can specify a directory with -P; is it possible to download a list of files, and specify filenames for each of them?

share|improve this question
Potential duplicate:… – leecbaker Sep 17 '11 at 9:18
up vote 3 down vote accepted


Probably not with wget


Something like ...

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

For Windows use " instead of '


I note that curl has some options that might be relevant

-K, --config

Specify which config file to read curl arguments from.


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} -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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.