How to prevent auto-closing of console after the execution of batch file

In Windows/DOS batch files:

pause

This prints a nice "Press any key to continue . . . " message

Or, if you don’t want the "Press any key to continue . . ." message, do this instead:

pause >nul

Leave a Comment