- Feb
- 11
- 0
The following batch file is executed differently by TCC and CMD:
if exist Child.bat (
Child.bat
exit /b
)
TCC does not launch the Child.bat and CMD does. The workaround is using "call Child.bat" instead of just "Child.bat" but TCC obviously is not fully compatible with CMD. It is funny that /b option of the "exit" command is described in the TCC documentation as "This switch is for compatibility with CMD".
It is interesting that if the first and last lines are commented out, the TCC does launch the Child.bat:
rem if exist Child.bat (
Child.bat
exit /b
rem )
if exist Child.bat (
Child.bat
exit /b
)
TCC does not launch the Child.bat and CMD does. The workaround is using "call Child.bat" instead of just "Child.bat" but TCC obviously is not fully compatible with CMD. It is funny that /b option of the "exit" command is described in the TCC documentation as "This switch is for compatibility with CMD".
It is interesting that if the first and last lines are commented out, the TCC does launch the Child.bat:
rem if exist Child.bat (
Child.bat
exit /b
rem )