WARNING: This site is intended for online use only; mass-downloading of pages degrades the server and is prohibited.
If you attempt to use tools to mass-download the site, you may be blocked permanently by automated software.
If you want to read this CertiGuide offline, please use one of the links on the left to purchase a convenient PDF copy. Thank you.

Get the A+ 4 Real e-book for your own computer.
Click Here!

Custom Search

Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 1: What are Operating Systems and How Do They Work?
      9  CDI System Commands

Previous Topic/Section
The CD Command
Previous Page
Pages in Current Topic/Section
Next Page
The Prompt Command
Next Topic/Section

The DIR Command

Typing DIR and pressing return will display a list of every file stored in the current directory, which is the CDI equivalent of viewing a folder listing in Explorer. Various parameters are available to change the information displayed by the DIR command, the most common and useful of which is the “/P” switch. This instructs the DIR command to display only one page of directory listings, and then pause the display until a key is pressed – useful for directories with large amounts of files.

At the bottom of every directory, listing a summary paragraph is displayed, detailing the number of files in the directory and the total disk space they consume.

Figure 177: Summary of Directory Information


Figure 178: Using the /P (Pause) Switch on the Dir Command


DIR has many useful options, so it is worthwhile reviewing the help output of the “/?” switch. In many cases it is possible to combine switches on one command.

Just using the DIR command to list the entire contents of directories has limited uses, so wildcards can be used to modify the output. They are used in exactly the same way as the Explorer’s GUI search feature; just specify a partial pattern and use an asterisk to allow the DIR command to match the rest. A second, less used wildcard is available by using a question mark in place of unknown characters. Whereas a single asterisk will pattern match any number of characters, a question mark will only pattern match one character.

Some examples of patterns and files they match are shown in Table 6.

Table 6: Dir Command – Search Switches




CompTIA.doc, Computers.doc


Comp1.doc, CompA.doc


CompTIA.doc, Computers.txt


Comp1.doc, CompA.txt

Previous Topic/Section
The CD Command
Previous Page
Pages in Current Topic/Section
Next Page
The Prompt Command
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $

Home - Table Of Contents - Contact Us

CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005

Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.