I am using rake to build my project and I have a build.bat file similar to this:
@echo off
cls
rake
When I double click on build.bat the dos wi
Use this snippet:
@echo off
echo something
echo.
echo press enter to exit
pause >nul
exit
@echo off
echo somethink
echo Press enter to exit
set /p input=
pause
will display:
Press any key to continue . . .
Default interpreters from Microsoft are done in a way, that causes them exit when they reach EOF. If rake is another batch file, command interpreter switches to it and exits when rake interpretation is finished. To prevent this write:
@echo off
cls
call rake
pause
IMHO, call operator will lauch another instance of intepretator thereby preventing the current one interpreter from switching to another input file.
My guess is that rake
is a batch program. When you invoke it without call
, then control doesn't return to your build.bat
. Try:
@echo off
cls
CALL rake
pause
@echo off
echo Press any key to exit . . .
pause>nul