2 replies
by waliveto Accepted solution
by rob miners Accepted solution
pause
Suspends processing of a batch program and prompts the user to press any key to continue.
Description
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.
Examples
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
This discussion is closed to new replies.
Trending Networks posts
Sort by Trending