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