|
Answer» Hi,
I have a Dos/win batch file which has the commands that invoke an APPLICATION session along with arguments in it.
I have second batch file which calls first batch FILES 5 times with actual values passed for the arguments.
Each time, I run second batch file which opens up 5 sessions of the application at a time . Hence, I can see 5 COMMAND windows running at a time with the details flashing on the 5 command windows.
My requierment is :
I want all the sessions to execute for 5 loops which is DEFINED already . If there is any failure before that, the window's title will become 'Command promt' which was different before that. I want to write the status of execution into a new file as - if passed in 5 loops, the status as pass , otherwise 'fail' with loop num mentioned there. It may be possible to check the errorlevel value from each of the 5 PROCESSES. Not all programs update the errorlevel value and in any case there is no standard for doing so. My best guess would be to check for a non-zero value, write the appropriate execution status and update the window title.
Writing messages to a common text file from multiple processes can lead to unpredictable results.
|