Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can aria2c download list of urls with specific file names for each?

Tags:

download

aria2

For example i have a list of URLs:

https://link.com/file/get/somefile.ext
https://go.com/download/anotherfile.ext
https://program.com/selection/download.php?id=26162

I want to set a specific name for last URL, something like this:

https://program.com/selection/download.php?id=26162 -o thirdfile.ext

Is it possible with aria2c download list syntax?

I know that I can do like this:

aria2c https://link.com/file/get/somefile.ext
aria2c https://go.com/download/anotherfile.ext
aria2c https://program.com/selection/download.php?id=26162 -o thirdfile.ext

But this way I run just too much of aria2c's. ._.

like image 732
BladeMight Avatar asked Sep 07 '17 18:09

BladeMight


Video Answer


1 Answers

From the documentation on --input-file=

Additionally, options can be specified after each URI line. Option lines must start with one or more white space characters (SPACE or TAB) and must only contain one option per line. … See the Input File subsection for details.

If you ask me, that is not exactly crystal clear. So here's an example of an input file (with a single entry):

http://www.openclonk.org/header/logo.png
        out=openclonk.png
like image 86
Caesar Avatar answered Sep 22 '22 17:09

Caesar