2

what does it mean when I call batch script from batch script withoutCALL orSTART?

example. I have two scripts a.bat and b.bat

a.bat:

echo I am A >> logb.batecho end of A >> log

b.bat:

echo I am B >> logsleep 1echo end of B >> log

after execution of a.bat i see in thelog:

I am A I am B end of B

Where is message "end of A" ?

askedJan 29, 2013 at 15:17
erik80's user avatar
1

1 Answer1

4

The end of messagea.bat is never reached because when you call another batch file withoutstart orcall it transfers control over to that batch, and never returns.

If you wanted it to return to the calling batch, you would usecall, or you could usestart but that would start another instance of cmd (unless you use the/b switch).

answeredJan 29, 2013 at 15:22
Bali C's user avatar
Sign up to request clarification or add additional context in comments.

1 Comment

Actually evenstart /B starts a newcmd instance (check in Windows Task Manager), but no new window is created...

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.