Chapter 21

Creating and Testing Batch Files

In this chapter, you will learn to:

  • Use Batch File Commands
    • Employ the Call Command
    • Employ the Choice Command
    • Employ the Echo Command
    • Employ the Exit Command
    • Employ the ForFiles Utility
    • Employ the For Command
    • Employ the GoTo Command
    • Employ the If Command
    • Employ the Pause Command
    • Employ the Prompt Command
    • Employ the Rem Command
    • Employ the TimeOut Utility
  • Test Batch Files
    • Add Debug Information to Batch Files
    • Identify Batch Files and Their Actions
    • Use a Centralized Data Store
  • Store and Retrieve Directories with the PushD and PopD Commands

Batch files have been around since the days of DOS. They’re reliable, easy to write, exceptionally easy to understand for the most part, and there’s a large ...

Get Windows® Command-Line Administration: Instant Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.