bob001
asked on
Need help! DOS Batch file to wait for another program to finish
I need a DOS batch file to do such: start at 5am in the morning, but wait for another program to finish, when the other program finishs, if the status of the other program is a success, then pass a success output, otherwise pass a failure out.
Could someone drop a sample code to help out?
Thanks.
Could someone drop a sample code to help out?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey.
Try the code below to wait for a program to terminate before processing rest of batch.
Start /wait x:\path\file.
For help with start use the Start /? switch.
Try the code below to wait for a program to terminate before processing rest of batch.
Start /wait x:\path\file.
For help with start use the Start /? switch.
ASKER
Here2Help,
If I use start, how do I know the return status of the program I wait for?
If I use start, how do I know the return status of the program I wait for?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To assist with the actual scheduling of the batch file, Eric Phelps created a simple command line scheduler.
Download it, unzip it to any folder, and read the "readme.txt" file for the syntax. It uses an .ini file that can easily be tailored to suit your needs.
http://www.ericphelps.com/schedule/schedule.zip
Download it, unzip it to any folder, and read the "readme.txt" file for the syntax. It uses an .ini file that can easily be tailored to suit your needs.
http://www.ericphelps.com/schedule/schedule.zip
Good to see you around again Bill :o) - You been hiding? :P
Nope, I hide most of the time in the place I know best - Windows 98 topic area, but have the occasional foray into other areas to see if I know enough to make any sensible and useful suggestions :-)
ASKER