Batch file forum

davedive

Distinguished
Jun 30, 2011
1
0
18,510
Hello,
I am trying to create a batch file that runs 3 other batch files. Right now, it works fine using the call command on each other batch file. However, these other batch files take awhile to run. and so the entire process takes a very long time, since each "sub" batch file is run only after the previous one is finished. I was wondering if there is a command or way to start a batch file fro the top-level batch file, then go on and start the next batch file before the previous one is finished. In other words, I want the sub batch files to run in parallel in the background. (similar to the '&' in Unix). Is there any way to do this?
 

pyrozen

Distinguished
Apr 12, 2009
11
0
18,510
might be a reallllly dumb answer, but if the 3 batch files can run simultaneously, why not just execute them manually in quick succession and avoid another batch file overseeing the operations?

however.... you can use the start command to force them to start...
START PROG1.EXE
START PROG2.EXE
START PROG3.EXE

OR! you can use the mysterious and magical pipe!
PROG1.EXE | PROG2.EXE | PROG3.EXE

The pipe is actually meant to "pipe" the output of one exe into the next, but when the exe's don't care, they simply run at the same time.

these may require some finessing to get working, my memory is a bit forrgy when it comes to batch files these days.

lee