Batch file to wait for program to finish




















If you want the file to timeout after checking a certain amount of times, you could use a counter within the loop to limit the amount of times it loops.

This can be modified to fit your needs. Or if you know how long it takes to execute, you can take a look at the sleep command, provided by the Windows Server Resource Kit Tools. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Learn more. How do you wait for an exe to complete in batch file? Ask Question. Asked 10 years, 10 months ago. Active 1 year, 4 months ago. Viewed k times. Is there any way to tell it to wait until the process it started completes and then shutdown? Improve this question. JeffG 1, 6 6 silver badges 18 18 bronze badges. Kravlin Kravlin 1 1 gold badge 6 6 silver badges 9 9 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Can you chain? What if you need to wait for a process that the batch file didn't start?

Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free. Welcome, Guest. Please login or register. Did you miss your activation email? Forum only search News:. Home Help Login Register. Pages: [ 1 ] Go Down. Author Topic: Forcing wait-to-finish for each command in batch files Read times. When running a batch file, each command does not seem to wait until a previous command has finished. Code: [Select]. Post as a guest Name.

Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 1. Related Hot Network Questions.

Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.



0コメント

  • 1000 / 1000