a.cmd:
Code: Select all
@echo off
echo A
exit
And b.cmd:
Code: Select all
@echo off
echo B
Now execute a.cmd and then b.cmd:
Code: Select all
c:\a.cmd&b.cmd
Result:
CMD window closes.
Now change a.cmd to this:
Code: Select all
@echo off
echo A
goto :EOF
(goto :EOF above could of course be omitted in this case).
Execute it:
Code: Select all
c:\a.cmd&b.cmd
Result:
Code: Select all
c:\>a.cmd&b.cmd
A
B
c:\>
We can see that b.cmd is not executed if we have EXIT in procedure a.cmd. I would expect: a.cmd completes with EXIT and next command (calling of b.cmd) executes. But looks like it is not.
Can this be avoided? Thoughts?
Thanks.
Saso