Pause the execution of a batch file


Displays the message "Press any key to continue . . ."

To suppress the message:
PAUSE >nul

To display a different message:
Echo Pulse cualquier tecla para continuar
PAUSE >nul

Execution of a batch script can also be paused by pressing CTRL-S (or the Pause|Break key) on the keyboard, this also works for pausing a single command such as a long DIR /s listing.
Pressing any key will resume the operation.

PAUSE does not set or clear the Errorlevel.
PAUSE is an internal command.

“Advertising may be described as the science of arresting the human intelligence long enough to get money from it” - Stephen Leacock

Related commands:

SLEEP - Wait for x seconds.
TIMEOUT - Delay that allows the user to press a key and continue immediately.
PowerShell: Pause
Equivalent bash command (Linux): read -p "press any key to continue" or ctrl-z & fg

Copyright © 1999-2021
Some rights reserved