8

Possible Duplicate:
How to call one batch file after another

I have a batch file coordinating the activity of two other batch file. How can I make it execute the second batch file only after the first bat file finishes execution (execute the sequentially). I do not care if the first batch file executes successfully or not.

0

2 Answers 2

16

Use call to continue the execution of the first file, like:

echo batch controller
call batch1.bat
call batch2.bat
echo batch controller running again
Sign up to request clarification or add additional context in comments.

4 Comments

I don't think that's the question. There's a top-level batch file that's executing two secondary batch files sequentially.
@Jim ... it should work the way I posted ... where do you see the problem, here? I edited the example to use two batchfiles.
Yes, you're right that "call" needs to be used here.
Thanks for the useful site. def, something to add to my bookmarks.
2

They will execute sequentially naturally unless your first one is spawning processes without waiting. See START /WAIT for a way to start a process on the command line, but wait for it to finish before proceeding.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.