Collectives on Stack Overflow. Learn more. How can I make the batch file wait until another batch file completes execution? Ask Question.
Asked 11 years, 9 months ago. Active 2 years, 10 months ago. Viewed 56k times. How can I make a batch file wait until another batch file has finished? Is there any method to check whether ar. Arunachalam Arunachalam 4, 20 20 gold badges 47 47 silver badges 77 77 bronze badges. Add a comment. Active Oldest Votes. How to know that CVS update command in bat file is executed successfully. After successful execution only - it need to execute the next line.
Whether success OR failure a log file need to be created in specified path. I call this batch file from a utility, In that utility i have several batch files waiting to be executed subsequently. After the successful execution of batch1 - It then need to execute the next batch2. Batch1 may take some time, Till then batch2 should wait and then after completion of batch1 it should execute batch2.
Please help in this queries I have googled and found nil result relate to my issue. Thanks Paulwintech. Wednesday, July 7, PM. But the batch file execution time varies with different versions of the App, so adding a delay after this is not ideal. Run' command. I need to be able to wait for the batch file execution to be completed before I start the next keyword test in my suite. Is there a way for me to add a parameter to this command to achieve this or get a return code 0 from the batch file to signal that it is completed the execution and add this as a check before I run the next test?
Go to Solution. This works! It takes a parameter and test run resumes only after the batch file has completed it's execution. View solution in original post. Not only do I need to wait for the batch file execution to complete, I also need to pass a variable to the bacth file from my calling keyword test.
OleObject "WScript. Call Sys. Is your batch file set up to parse input parameters correctly? No use passing them in if it's not set up to use them!
And telling if it's complete? Depends what it does. If there is something on-screen you can watch for, use that. If you want to look into using exit codes either reading them or using them within the batch script to trigger some sort of on-screen indicator , start reading here:. Yes, the batch file reads my input correct and uses it to get the install files that I am looking for.
I used ''TestedApps. Run' command and passed the parameter. This works correctly, but the problem is that while the batch file is still getting all the files, my test suite contines with the rest of the tests. I only want the rest of the tests to start, once the batch file execution is done. The amount of time required for this varies from 5 minutes to maybe 10 or more minutes. That is the reason I need a way to delay the rest of the tests from executing until this is finished first. Run AFileName, 1, True.
0コメント