How to run multiple dos commands?
I have a for
loop, which runs detection of server to detect which server works and is fast. And because there is more servers, I wish not to run all server detections in sequence, but in parallel.
This question is related to
batch-file
cmd
if you have multiple parameters use the syntax as below. I have a bat file with script as below:
start "dummyTitle" [/options] D:\path\ProgramName.exe Param1 Param2 Param3
start "dummyTitle" [/options] D:\path\ProgramName.exe Param4 Param5 Param6
This will open multiple consoles.
I suggest you to see "How do I run a bat file in the background from another bat file?"
Also, good answer (of using start
command) was given in "Parallel execution of shell processes" question page here;
But my recommendation is to use PowerShell. I believe it will perfectly suit your needs.
Source: Stackoverflow.com