DOS (Disk Operating System) is an interface that a system administrator can use to perform tasks and configure the system by typing text commands. There are many commands available with the DOS command line interface, most of them feature switches, and wild cards which make them very powerful.
Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds


Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022


DOS Switches and Wild Cards

DOS (Disk Operating System) is an interface that a system administrator can use to perform tasks and configure the system by typing text commands. The interface is referred to as the command line. To run DOS commands you need to open a command window. To open a command window select Start | All Programs | Accessories and click on Command Prompt.

A command window is a window that displays the DOS prompt. The DOS prompt is the location in the command window where you type command text. There are many commands available with the DOS command line interface, most of them feature switches, and wild cards which make them very powerful.

dir is a very common DOS command. The dir command returns a list of all the folders and files in the path listed in the DOS Prompt. Type dir at the blinking insertion cursor and press the keyboard [Enter] key. A list of all the folders and files in the path listed should appear in the command window.

c:\myfiles dir
 Volume in drive C has no label.
 Volume Serial Number is 3C7A-A692

 Directory of C:\myfiles

06/08/2009  10:00 AM              .
06/08/2009  10:00 AM              ..
08/20/2008  03:11 PM             2,352 cat story.txt
02/02/2006  11:33 AM            14,998 charcodes.txt
12/31/2007  01:42 PM             1,036 create your own.txt
06/06/2008  09:15 AM             2,230 deathid.txt
08/07/2008  08:34 AM            19,226 diet.txt
12/12/2008  09:09 AM               448 ebayServices.txt
09/30/2008  08:10 AM             2,761 greeting cards.txt
02/17/2006  09:45 AM               669 micromanage.txt
12/12/2007  12:29 PM               159 negotiating_ploys.txt
03/18/2008  11:00 AM            11,854 pharmaceuticals.txt
03/24/2008  08:00 AM             1,578 Photo Radar.txt
06/21/2008  04:25 PM             4,506 SS benefits.txt
              12 File(s)         61,817 bytes
               2 Dir(s)  198,174,113,792 bytes free

Dos Command Switches

Switches let you control any options available with a DOS command. A switch is a character prefaced with a forward slash. A switch must be separated from the command and from other switches by a space. Shown below is use of the dir command with the /p switch, which causes the list of folders and files to be paged.

c:\myfiles dir /p
 Volume in drive C has no label.
 Volume Serial Number is 3C7A-A692

 Directory of C:\myfiles

06/08/2009  10:00 AM              .
06/08/2009  10:00 AM              ..
08/20/2008  03:11 PM             2,352 cat story.txt
02/02/2006  11:33 AM            14,998 charcodes.txt
12/31/2007  01:42 PM             1,036 create your own.txt
06/06/2008  09:15 AM             2,230 deathid.txt
Press any key to continue . . . _

This switch could be very useful if, for example, you wanted to get a list of all the folders and files in the c:\Windows\System32 folder or any folder that contains a large number of folders and / or files.

RSS Feed RSS Feed


Follow Stephen Bucaro Follow @Stephen Bucaro

Computer Subsections

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2016 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268