Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- TITLE %~n0
- :: REM Each subrograms path to be run in parallel is to be passed as parameters to the launch function.
- :: REM Sequential Launching is achieved with Additional instances of Call with parameters
- CALL :Launch "program1_1.bat" "program1_2.bat" "program1_3.bat"
- CALL :Launch "program2_1.bat" "program2_2.bat" "program2_3.bat"
- ECHO Subs Complete
- PAUSE >nul
- EXIT
- :Launch
- FOR %%a IN (%*) DO (
- START "+++batch+++" "%%~a"
- )
- :Loop
- TIMEOUT /T 1 >nul
- TASKLIST /FI "windowtitle EQ +++batch+++*" |FIND "cmd.exe" >nul && GOTO :Loop
- GOTO :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement