Wait For Process in a Batch File

A while ago I needed to wait for a process to end in a batch file, before the script continued.  I did it by using an If statement to create a ‘spoof’ loop, with a delay between each loop iteration of 5 seconds.  This example waits for the ‘Java.exe’ process to end before the script continues:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.