January 2005
Intermediate to advanced
688 pages
25h 59m
English
pause
Suspends processing of a batch program and prompts the user to press any key to continue.
Include the pause command whenever you want your
batch file to stop and wait for user input, giving the user a chance
to read the text on the screen, insert a floppy disk, or press Ctrl-C
to abort the batch file.
The message “Press any key to
continue...” is automatically displayed whenever the
pause command is used; it is not affected by the
echo off statement.
Prompt the user to change disks in one of the drives in a batch program:
@echo off echo Insert next disk in drive A, and pause
When this batch file is executed, the following message will appear:
Insert next disk in drive A, and Press any key to continue ...
Something like this is also common:
@echo off echo Press Ctrl-C to cancel, or pause
Read now
Unlock full access