• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Understanding Batch Files > Pausing for Input in a Batch File

Pausing for Input in a Batch File

Before DOS 6.0, the only way to effect the execution of a batch file after the file started was to press Ctrl+C or Ctrl+Break. These key combinations enabled you to cancel a single command or end the entire operation. Starting with DOS 6.0, you are provided a means of temporarily halting the execution of a batch file and accepting limited user input. You can use this feature to decide whether to process certain commands, to branch to a different part of a batch file, or even to present a menu and accept any of a series of choices.

To employ this capability, you use the CHOICE command. The command's syntax is as follows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint