Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: PAUSE
 Description
 Syntax
 Remarks
  Prompting the user to continue the program
  Dividing a batch file into sections
 Examples

MS DOS Command: PAUSE

Reference from Microsoft MS-DOS cmd help

Description

Suspends processing of a batch program and displays a message that prompts the user to press any key to continue. You can use this command only within batch programs.

Syntax

PAUSE

Remarks

Prompting the user to continue the program

MS-DOS displays the following message in response to the PAUSE command:

Press any key to continue . . .

Dividing a batch file into sections

If you press CTRL+C to stop a batch program, MS-DOS displays the following message:

Terminate batch job (Y/N)?

If you press Y (for yes) in response to this message, the batch program ends and control returns to the operating system. Therefore, you can insert the PAUSE command before a section of the batch file you may not want to process. While PAUSE suspends processing of the batch program, you can press CTRL+C and then Y to stop the batch program.

Examples

Suppose you want a batch program to prompt the user to change disks in one of the drives. To do this, you might create the following file:

  • @echo off
  • :begin
  • copy a:*.*
  • echo Please put a new disk into drive A
  • pause
  • goto begin

In this example, all the files on the disk in drive A are copied to the current directory. After the displayed comment prompts you to place another disk in drive A, the PAUSE command suspends processing so that you can change disks and then press any key to resume processing. This particular batch program runs in an endless loop. The GOTO BEGIN command sends the command interpreter to the begin label of the batch file. To stop this batch program, press CTRL+C and then Y.


©sideway

ID: 110700235 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019