title: command to synchronize two .bat from vbs
body: <p>I have two bat which are running and I have to wait that "job.bat" is ended off before run "another.bat" because "another.bat" is using a file which comes from "job.bat". Please How to synchronize them within the vbs? Thanks</p>
  
  <pre><code>shell.run "job.bat ""my file""" &amp; " " &amp; myVar
  'shell.exit
  shell.run "another.bat ""lib.txt""" &amp; " " &amp; outVar
  </code></pre>
  
  <p>I used this one between these two shell.run, waiting for file out is available from the first bat but it doesn't change anything</p>
  
  <pre><code>  While Not oFSO.FileExists("out") 
     wait 10
     Wend
  </code></pre>
  
  <p>I'm surprised because i had always thought the vbs program is sequential access (sequential instructions), while I was seeing "another.bat" was beeing launched before "job.bat" is terminated!!!!!</p>