MyFile1.bat
invokes MyFile2.bat
twice:
start MyFile2.bat argA, argB, argC
start MyFile2.bat argX, argY, argZ
At this point, how can I wait until both processes spawned by the calls to MyFile2.bat
have completed?
Simple use the Start /WAIT parameter.
start /wait MyFile2.bat argA, argB, argC
start /wait MyFile2.bat argX, argY, argZ
start /w cmd /c "start cmd /c MyFile2.bat argA, argB, argC & start cmd /c MyFile2.bat argA, argB, argCt"
According to my tests this should work providing that the MyFile2.bat .Eventually the full paths to the bat files should be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With