This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Suspends the processing of a batch program, displaying the prompt,Press any key to continue . . .
pause| Parameter | Description |
|---|---|
| /? | Displays help at the command prompt. |
If you press CTRL+C to stop a batch program, the following message appears,Terminate batch job (Y/N)?. If you pressY (for yes) in response to this message, the batch program ends and control returns to the operating system.
You can insert thepause command before a section of the batch file that you might not want to process. Whenpause suspends processing of the batch program, you can press CTRL+C and then pressY to stop the batch program.
To create a batch program that prompts the user to change disks in one of the drives, type:
@echo off:Begincopy a:*.*echo Put a new disk into Drive Apausegoto beginIn this example, all the files on the disk in Drive A are copied to the current directory. After the message prompts you to put a new disk in Drive A, thepause command suspends processing so that you can change disks and then press any key to resume processing. This batch program runs in an endless loop—thegoto begin command sends the command interpreter to the Begin label of the batch file.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?