scripting - How to spawn several processes from the Windows shell and wait for them all to complete? -


I want to do the following from Windows Batch Script:

  Start proc1.exe Start proc2 .exe ... start procN.exe & lt; To complete all the N processes & gt; & Lt; - What do I do here?  

How do I complete the fully-prepared processes?

It's ugly, but you can enter each command in another batch file Which can execute the command and then the signal is completed your main batch file calls each batch file asynchronously and sits in the loop waiting for the signal. For example:

main.bat

  Start CMD / C proc1.bat start CMD / C proc2 .bat: Waiting Sleep 1 If wait already proc1done wait before proc2done goto wait del proc1done del proc2done echo all the processes are complete  proc1.bat   
  proc1.exe echoed & gt; Procap1done  

Sleep command is available. If you do not have this, you can use ping on the local host to slow down that tight loop.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -