Commodore PC Ms-Dos 3.2 User's Manual page 186

Table of Contents

Advertisement

114 MS-DOS User's Reference
Pause
i
Pause
Purpose:
Suspends execution of a batch file.
Syntax:
pause [comment]
Comments:
When a batch file is running, you may need to change disks or
perform some other action. The pause command suspends execu
tion of the batch file until you press any key, unless you press the
control-c key sequence.
When the command processor encounters pause, it prints the
following message:
Strike
a
key
when
ready
.
.
.
If you press control-c, ms-dos displays the following message:
Terminate
batch
job
(Y/N)?
If you type Y in response to this prompt, the batch file ends and
control returns to the operating system. Therefore, you can use
pause to divide a batch file into pieces that allow you to end the
batch command file at any intermediate point.
The comment parameter is useful when you want to display a
special message. Unless echo is off, pause displays this comment
before the "Strike a key" message.
U
U
Using pause
messages in a batch
file
Note
The pause and comment line of your batch file will not
appear if echo is off.
Example:
Suppose you want a program to display a message that asks the
user to change disks in one of the drives. To do this you might
use the following command:
Pause
Please
put
a
new
disk
into
drive
A
If echo is on, this line will precede the "Strike a key" message
when you run the batch file.
u
u

Advertisement

Table of Contents
loading

Table of Contents