Call multiple batch files from one master batch file and manage parallel executions

  batch-file, windows

I want to call multiple batch files from a single master batch file and manage the number of parallel executions.

So I have one xyt.bat file that looks like this:

cd ."computation"
start computation_1.bat
cd ."computation"
start computation_2.bat
cd ."computation"
start computation_3.bat

Each of the bat files starts a few computations for example like this:

start ....exe ...
start ....exe ...
start ....exe ...

If I run it like this, 9 command prompts open at the same time and 9 computations are executed parallel. With 9 computations it might be fine, but I can potentially have a couple of thousand. I would like to manage the number of parallel computations and would like to have a single command prompt for the xyz.bat that shows me the progress somehow and tells me when all the computations are finished. I was experimenting a bit with "start","call", "wait" and even without any of these, but couldn’t figure out a solution for that. Does anyone have an idea how to tackle this problem?

Source: Windows Questions

LEAVE A COMMENT