Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the first .bat file, down.bat, for downloading movie trailers from apple.com:

C:\wget.exe -U "QuickTime/7.6.2" %1

And I also have this second file, batch.bat with all the trailers I want to download:

down http://trailers.apple.com/movies/ifc_films/enterthevoid/enterthevoid-tlr1_h1080p.mov
down http://trailers.apple.com/movies/fox/vampiressuck/vampiressuck-tlrc_h1080p.mov
down http://trailers.apple.com/movies/universal/skyline/skyline-tlr1_h1080p.mov
down http://trailers.apple.com/movies/sony_pictures/takers/takers-tlr2_h1080p.mov

When I run it from cmd.exe, only the first trailer gets downloaded, just like there is only one line in the batch.bat file.

How to make it work properly?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

In batch.bat, insert CALL before every line.

Example:

CALL down http://trailers.apple.com/movies/ifc_films/enterthevoid/enterthevoid-tlr1_h1080p.mov
CALL down http://trailers.apple.com/movies/fox/vampiressuck/vampiressuck-tlrc_h1080p.mov
CALL down http://trailers.apple.com/movies/universal/skyline/skyline-tlr1_h1080p.mov
CALL down http://trailers.apple.com/movies/sony_pictures/takers/takers-tlr2_h1080p.mov

The reason for this is that if you just start one bat file from another, only one of them will exit, while if using CALL, when the called bat file exits, the calling bat file will continue executing.

share|improve this answer
add comment

Your Answer

 
discard

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.