0

I'm trying to execute a command or script that will run a list of aria2 commands consecutively. I've tried writing a bat/cmd file for it but it always provides an error, specifically:

 [httpskipresponsecomand.cc:219] errorcode=3 resource not found.

Anyone know how to automate multiple aria2 commands?

For reference this is a template of the commands I'm using:

aria2c -P -Z -c -d c:\folder\destination\here -j 5 --check-certificate=false ^
       hxxp://site.com/videofiles/video_[1-200].ts

This works with out a problem when I run the commands manually, one by one, but when I run it in a .bat/.cmd file, I get the above error.

Been struggling with this for awhile now. Hopefully someone knows how to automate multiple aria2 commands to successfully execute in a consecutive manner.

3
  • 2
    plz add source code for the batch file.
    – MTG
    Sep 1, 2018 at 5:18
  • @MTG the batch file just has the commands above. For example: ::line 1:: aria2c -P -Z -c -d c:\folder\destination\here1 -j 5 --check-certificate=false hxxp://site.com/videofiles/video1_[1-200].ts ::line 2:: aria2c -P -Z -c -d c:\folder\destination\here2 -j 5 --check-certificate=false hxxp://site.com/videofiles/video2_[1-200].ts and so forth
    – Maxo
    Sep 1, 2018 at 21:00
  • 1
    well, thanks, but technically speaking you should edit your question add source code as a quote, to be comprehensive enough for reviews, and to better show any possible errors. "and so forth" does not help.
    – MTG
    Sep 3, 2018 at 8:24

1 Answer 1

0

It's not clear what resource is not found. It could be that brackets are interpreted by your command processor before being passed to aria2.

You can store the list of URIs a file. Then you would use --input-file option to download all the files from the list:

aria2c -P -Z --input-file=files-to-download.txt

You can use the parametrised URIs in the input file, see the format to input file. Basically, it should look like:

hxxp://site.com/videofiles/video1_[1-200].ts
hxxp://site.com/videofiles/video2_[1-200].ts

Alternatively, you may use a for-loop to generate the list of files:

for /L %%i in (1,1,200) do aria2c hxxp://site.com/videofiles/video1_%%i.ts

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .