krcroft wrote:So long as you explicitly 'exit' at the end of a bat file, control will return to the parent batch file.
Nope. It will terminate the command shell (or DOSBox). Try the following. (Note that "tmp1.bat:" and "tmp2.bat:" are the names of files to put the following commands in, not labels.)
tmp1.bat:
echo tmp1 start
tmp2
echo tmp1 end
tmp2.bat:
echo in tmp2
exit
Take out the exit, and the batch execution will stop at the end of tmp2. To get nested batch files, use call:
tmp1.bat:
echo tmp1 start
call tmp2
echo tmp1 end
tmp2.bat:
echo in tmp2
Sincerely,
Gene Wirchenko