Exit

Exit on key pressed with customized message.

Description: Letting the PAUSE command show the "Press any key to continue" message on exit may cause some confusion, since the application will finish and not continue. An ECHO command preceding the PAUSE command can be used to show a customize message. The text output of the PAUSE command can be omitted by piping its output into the NUL device.
Script:
1.
2.
::: -- End of application --
ECHO.&ECHO.Press any key to end the application.&PAUSE>NUL&GOTO:EOF