I've 2 batch scripts to run in background:
script1.bat
script2.bat
And the third batch script to run only after the 1st two scripts are executed
script3.bat
My main script main.bat calls these 2 in background:
start /B cmd /C script1.bat
start /B cmd /C script2.bat
These 2 scripts take 1 hour each to complete and hence need to complete in background.
I want the main.bat to check if these 2 scripts completed and only then execute script3.bat.
Is there any way I can do this?
Below are the scripts contents
script1.bat
@echo off
set "MyProcess=script1.exe"
*** do something that takes 1 hour****
script2.bat
@echo off
set "MyProcess=script2.exe"
*** do something that takes 1 hour****
script3.bat
@echo off
set "MyProcess=script3.exe"
*** do something that takes 1 hour****
main.bat
@echo off
start /B cmd /C script1.bat
start /B cmd /C script2.bat
call script3.bat