PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

BAT file help

I know - this isn't a Pocket PC question. I don't like posting real topics to Anything Discussion though. :)

I have a BAT file that simply executes a few programs in turn. The problem is that it is launching all the programs at once without waiting for the previous program to terminate. Each step generates a file that the next command relies on. I have tried checking return codes, but the BAT still runs them all at once. Any suggestions?

Dan East
Welcome to the world of multitasking =)

What you should do is have each program call the next one instead of relying on a batch file.

When exiting, your first program should start the next one. This one should in turn start the 3rd one when exiting, etc.
simonjacobs · 22 Feb 2002, 15:56 UTC
Dan:

Try typing:

start /?

into an msdos prompt. You will see it is exactly what you need here. Check out the /WAIT option.

Hope that helps.
Does this "start /sync" works to execute nested batch files?
Use Perl :wink:

Pam
start /wait [app]

but someone beat me to it... :-D
Use

Call c:\xxx

Call waits for the program to terminate before going on to the next line in the batch.