I have a batch file,
bat1.bat
bat2.bat
but it stops at the end of bat1
any clues?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
call:By default, when you just run a batch file from another one controll will not pass back to the calling one. That’s why you need to use
call.Basically, if you have a batch like this:
then it will only output
If you write it like
however, it will output
because after
batch2terminates, program control is passed back to your original batch file.