I have two files:
File1.bat:
@echo of
File2.bat
pauseFile2.bat:
@echo off
echo hello
exit /bI expect File1.bat to call File2.bat and then pause, however the exit /b command is exiting the console like a plain exit command. Why is this?
1 Answer
One problem is that you didn't use call when calling the second file, so it wouldn't return no matter what it does.
Try
@echo of
call File2.bat
pause 1