Instructor: Prof. Michael P Harris Chapter 2
ITSC 1405 – Intro to PC Operating SystemsCommand Syntax
Chapter 2
Command Syntax—
Using the DIR Commandwith Parametersand Wildcards
LEARNING OBJECTIVES
1.Define command syntax.
2.Explain what parameters are and how they are used.
3.Explain the purpose and use of the DIR command.
4.Define prompts and explain how they are used.
5.Explain the purpose of the CD command.
6.Explain the purpose and function of a device.
7.Explain the purpose and function of device names.
8.Explain the purpose and function of defaults.
9.Explain the function and purpose of subdirectories (paths).
10. Explain the use and purpose of wildcards.
11. Define global specifications and identify their symbols.
12. Explain the purpose and function of redirection.
STUDENT OUTCOMES
1.Read a syntax diagram and be able to name and explain what each part signifies.
2.Use both fixed and variable parameters with the DIR command.
3.Give the names of the disk drives on your computer.
4.Change the default drive and the directory.
5.Use subdirectories (paths) with the DIR command.
6.Use global specifications with the DIR command.
7.Use wildcards with the DIR command.
8.Redirect the output of the DIR command to either a file or a printer.
9.Use online Help(/?).
CHAPTER SUMMARY
1.Command syntax means the correct command and the proper order for keying in commands.
2.A parameter is some piece of information that you want to include in a command. It allows a command to be specific.
3.A delimiter indicates where parts of a command begin or end. It is similar to punctuation marks in English.
4.Some commands require parameters. They are called mandatory or required parameters. Other commands allow parameters; these are called optional parameters.
5.A variable parameter or switch is one that requires the user to supply a value. A fixed parameter or switch has its value determined by the OS.
6.A syntax diagram is a representation of a command and its syntax.
7.The DIR command is an internal command that displays the directory (table of contents) of a disk.
8.DIR has many parameters, all of which are optional.
9.A file specification has two parts, the file name and the file extension. A file name is mandatory; however, a file extension is optional. If you use a file extension, separate it from the file name by a period, called a dot.
10.A valid file name contains legal characters, most often alphanumeric characters. It cannot contain illegal characters.
11.You may use the up or down arrow keys to perform command line editing.
12.Every device attached to the computer has a reserved, specific, and unique name so that the operating system knows what it is communicating with.
13.Disk drives are designated by a letter followed by a colon, as in A:.
14.A local printer has the device name of PRN, LPT1, LPT2, or LPT3.
15.Defaults are implied instructions the operating system falls back to when no specific instructions are given.
16.The root directory’s name is represented by the \ (backslash).
17.With some commands, such as DIR, parameters are preceded by a / (slash).
18.Subdirectories allow a disk to be divided into areas that can hold files.
19.Subdirectories are named by the user or by an application program.
20.The system prompt displayed on the screen is the default drive and directory.
21.You can change the default drive and default subdirectory.
22.To change the default drive, you key in the drive letter followed by a colon, as in A: or C:.
23.To change the default subdirectory, you key in CD followed by the subdirectory name, such as CD \DATA-or-CD \WINNT\SYSTEM32.
24.To change directories and drives at the same time, you use the /D parameter, such as
CD /D A:\DATA.
25.The subdirectory that contains the system utility files is usually \WINDOWS\SYSTEM32 or \WINNT\SYSTEM32.
26.You can look for files on drives and subdirectories other than the default if you tell the OS where to look by prefacing the files names with a drive designator and/or path name.
27.If the file is in a subdirectory, the file specification must be prefaced by the drive designator and followed by the subdirectory name. If the default drive \ directory is different than the location of the needed file, a user must include the subdirectory name in the command, as in C:\WINNT\SYSTEM32\FILENAME.EXT.
28.Global file specifications (* or ?) allow a user to substitute a wildcard for unknown characters.
29.The ?wildcard represents any one character in a file name (or none); the * wildcardmatches any string of characters in a file name (or none).
30.A command’s output that normally is displayed on the screen may be redirected to a file. You key in the command, add the redirection symbol (), and then key in the file name.
31.A command’s output that is normally displayed on the screen may be redirected to a local printer or a network printer, if you know the network printer name. You key in the command, add the redirection symbol, and then key in the device name (PRN or LPTn).
32.To get help for command syntax, key in the name of the command followed by a slash and a question mark, such as: DIR /?.
33.The DIR command allows you to sort the directory listing by use of the parameter /O(Order) followed by the sort order letter you are interested in. For instance, to sort by name, you would key in: DIR /ON.
KEY TERMS
alliasattributes
backslash
command line editing
convention
default
default drive
delimiter
designated drive
device
device name
documentation
eight-dot-three
extension
FF button / fixed parameter
folders
global file specifications
GUI
illegal characters
insert mode
logged drive
mandatory parameter
OEM
online button
optional parameter
overstrike mode
parameter
path / redirection
reset button
root directory
standard input
standard output
subdirectory
subfolders
switch
syntax
syntax diagram
variable parameter
volume
wildcard
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates ©2003ISBN: 1-887902-82-1Page 1