Computing.Net > Forums > Programming > Serial batch execution

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Serial batch execution

Reply to Message Icon

Name: simona
Date: May 11, 2008 at 13:08:42 Pacific
OS: Windows
CPU/Ram: ???
Product: ???
Comment:

Dear folks
I wrote a dos batch file, the first line call a c++ exe file (which generates a log file) and the next line will check if the log file did not created then echo a message on the screen

e.g:
__________________
start a.exe
if not exist a.log echo a.log did not created
___________________

it seems that before the a.exe completed the second line is already printed, how can i make sure that the second line will not started until the first complted as well ?




Sponsored Link
Ads by Google

Response Number 1
Name: chrisyunke
Date: May 11, 2008 at 18:25:59 Pacific
Reply:

im still a noob but try....

EDIT: i checked and the code i posted here doesnt work.


0

Response Number 2
Name: chrisyunke
Date: May 11, 2008 at 18:29:16 Pacific
Reply:

oops sorry.
i just got a chance to test out that code i just gave you, it wont work, i will continue to try for you....
Sry.

EDIT: Sry about multiple posts, just getting used to this forums workings.


0

Response Number 3
Name: chrisyunke
Date: May 11, 2008 at 18:43:51 Pacific
Reply:

OK, i have tested it and this code seems to work, lemme know if you have any problems.


===

@echo off

:begin
IF EXIST a.exe (start a.exe) ELSE goto no


:no
echo File does not exist
echo.
echo.

pause

===


0

Response Number 4
Name: Mechanix2Go
Date: May 11, 2008 at 23:17:37 Pacific
Reply:

Get rid of START


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 5
Name: klint
Date: May 12, 2008 at 03:54:02 Pacific
Reply:

You didn't specify which version of Windows you are using. It makes a difference.

Try the following:

start /wait a.exe
if not exist a.log echo a.log was not created


0

Related Posts

See More



Response Number 6
Name: simona
Date: May 13, 2008 at 10:50:30 Pacific
Reply:

Thanks for your all suggestions , it works properly


0

Sponsored Link
Ads by Google
Reply to Message Icon

Acer Aspire 5100 batch: search and verify ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Serial batch execution

Batch Files www.computing.net/answers/programming/batch-files/14618.html

Multi-batch file run from one .exe? www.computing.net/answers/programming/multibatch-file-run-from-one-exe/14857.html

batch: read vars from .txt___search www.computing.net/answers/programming/batch-read-vars-from-txtsearch/16494.html