Ch 2 Command Syntax



Chapter 2

COMMAND SYNTAX—USING THE DIR COMMAND WITH PARAMETERS AND 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 ? represents one character in a file name; the * matches a string of characters.

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 on a command, key in the name of the command followed by a forward 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 followed by the sort order letter you are interested in. For instance, to sort by name, you would key in DIR /ON.

KEY TERMS

|allias |fixed parameter |redirection |

|attributes |folders |reset button |

|backslash |global file specifications |root directory |

|command line editing |GUI |standard input |

|convention |illegal characters |standard output |

|default |insert mode |subdirectory |

|default drive |logged drive |subfolders |

|delimiter |mandatory parameter |switch |

|designated drive |OEM |syntax |

|device |online button |syntax diagram |

|device name |optional parameter |variable parameter |

|documentation |overstrike mode |volume |

|eight-dot-three |parameter |wildcard |

|extension |path | |

|FF button | | |

LECTURE NOTES

|CHAPTER OUTLINE |TEACHING SUGGESTIONS |

| |Slides 2-9 |

|CHAPTER OVERVIEW | |

|Will learn to read a syntax diagram and explain the function of each part of |Chapter Overview duplicated in the PowerPoint slides. |

|the diagram. |After completion of lecture, suggest to students that they review |

|Will learn some basic commands, their syntax, and how to make commands more |Objectives and Outcomes found on first page of chapter as a check to |

|specific. |see if they have mastered concepts. |

|Will be able to define prompts and explain how they are used. | |

|The purpose and function of defaults will be explained. | |

|Will learn how to change the default drive and directory. | |

|Will learn how to use subdirectories and wildcards with the DIR command. | |

|The purpose and function of redirection will be explained and then will learn| |

|how to redirect the output of the DIR command to a file or a printer. | |

|Will learn how to use the Online Help feature. | |

| | |

|COMMAND SYNTAX | |

|Command Syntax | |

|All languages have rules for speaking and writing. | |

|Syntax (word order) and punctuation of a language is important. | |

|Computers use language that consists of vocabulary, syntax, and punctuation. | |

|Commands. | |

|Similar to verbs. |SECTION 2.1 (p. 40) |

|Action you wish to take. |Slides 10-12 |

|GUI in Windows - still syntax and rules. | |

|Icon that points to a program based on rules of syntax. |User communicates with computer by using language that computer |

|An error message of “Bad command or file name” is computer saying, I don't |understands. |

|understand. |Command syntax is the language, punctuation, and order needed to |

| |execute a command properly. |

|WHAT ARE PARAMETERS? | |

|What are Parameters? |Discussion Question (1) - Define command syntax. |

|Provide information to modify/qualify command. |Discussion Question (2) - Why is syntax important when using a command?|

|Some commands. | |

|Require parameters. | |

|Have optional parameters - used for special purposes. | |

|Do not use parameters. | |

|Types of parameters. | |

|Variable parameters = user supplies value to command. | |

|Fixed parameters = cannot change fixed value (must use value provided). | |

|Parameters added to make action of command more specific. |SECTION 2.2 (pp. 40-41) |

| |Slides 13-16 |

|READING A SYNTAX DIAGRAM | |

|Reading a Syntax Diagram. |Discussion Question (3) - Define parameters. |

|Using DIR. |Discussion Question (4) -What is the difference between a variable and |

|First entry is always the command. |a fixed parameter? |

|Must be exact. | |

|Next parameters. | |

|Brackets - parameter is optional. | |

|Never key in brackets. | |

|N0 required/mandatory parameters for DIR. | |

|DIR syntax – See Power Point slide # | |

| | |

|USING FIXED PARAMETERS WITH THE DIR COMMAND | |

|Using Fixed Parameters with the DIR Command | |

|DIR uses optional parameters. | |

|Optional parameters (/W and /P are fixed). |SECTION 2.3 (p. 41) |

|Controls how directory is displayed. |Slides 17-18 |

|/W = wide display. | |

|/P = pause or paged display. |Use analogies. |

|With new versions rules do not change. |- Vocabulary (commands). |

|DIR has both optional and fixed parameters. |- Punctuation |

|Slashes must be keyed in, brackets never. |- Syntax (order). |

|When using DIR command by itself, files scroll by so quickly they cannot be |Discussion Question (5) - How would you use a syntax diagram? Why is |

|read. |the diagram important? |

|Use /P parameter to display one screen of information at a time. | |

|Must respond to prompt before another screen of information will appear. | |

| | |

|ACTIVITY—USING FIXED PARAMETERS WITH THE DIR COMMAND |SECTION 2.4 (pp. 41-42) |

|Using Fixed Parameters with the DIR Command |Slides 19-22) |

|Note: Whenever text refers to ACTIVITIES DISK – use working copy made in | |

|Chapter 1 labeled “ACTIVITIES DISK – Working Copy" |Fixed parameter referred to as switch and begins with the /. |

|Activity steps. |Discuss. |

|Boot system/Open Command Prompt window |- Difference between slash/backslash. |

|Key in: CD \ then Key in: CLS |- Why /P more efficient than using or + S keys. |

|Insert “ACTIVITIES Disk – Working Copy” in Drive A and make A: default drive.|Reiterate any special lab instructions. |

|Key in: DIR /P |If system varies from text refer to configuration table in Chapter 1.6.|

|Press 3 times, and/or until reach end of display. | |

|Key in: DIR /W | |

|Key in: DIR /P /W | |

|Return to system prompt | |

|Activity completed. | |

| | |

| | |

|USING FILE NAMES AS VARIABLE PARAMETERS | |

|Using File Names as Variable Parameters | |

|/P and /W are optional fixed parameters for DIR. | |

|Another parameter (name of file) can be used with DIR command. |SECTION 2.5 (pp. 42-46) |

|File naming review. |Slide 23 |

|Files formally called file specifications. | |

|File specifications broken into two parts: |Any special lab instructions? |

|File name. |Delimiter. |

|File extension. |- / slash. |

|Conventions for naming files: |- Signals one thing ending and another beginning. |

|All files in a directory (subdirectory) must have unique names. |- Forward slash (/) used only with fixed parameters. |

|File names are mandatory. |Mention that there is no space between / and P and / and W. |

|May be less than but no more than 256 characters long. |Discussion Question (6) - Name two parameters that can be used with the|

|File extensions are usually three characters long. |DIR command. Explain why you would use the parameters. |

|The following characters are illegal and may NOT be used in a file name: |Discussion Question (7) - Define delimiters. Give an example of a |

|\ / : * ? < > | |delimiter. |

|All other characters, including periods and spaces, are legal in Windows file| |

|names. |SECTION 2.6 (pp. 47-48) |

|File names should reflect subject of files. |Slides 24-30 |

|File extensions usually given by application creating the file. | |

|Many older 16-bit application packages (pre Windows 95) - |Naming conventions same in Windows XP as in Windows 2000. |

|Cannot deal with long file names, spaces or periods in file names. |Parameters are specific to each command. |

|Follow older DOS rules: |When giving file name give both parts - file name and file extension. |

|Eight characters in name and one to three characters in optional extension. |Even though spaces and long names can be used, it’s better to keep file|

|Files on Internet adhere to older DOS rules. |names short and concise. |

|DIR syntax using /P or /W: |Older DOS rule called 8.3 rule. |

|DIR [drive:][path][filename] [/P] [/W] |Dot (delimiter) only used between file name and file extension. |

|Filename in brackets | |

|- is a variable optional parameter. |Discussion Question (8) - Define file specifications. |

|- plug in value or name of file. |Discussion Question (9) - How do you separate a file name and a file |

|In some syntax diagrams, you will see [filename[.ext]] |extension? |

|- .ext in brackets as is part of file name syntax. | |

|File may not have an extension. | |

|If file has extension | |

|- must include it. | |

|- no spaces between file name and extension. | |

|Delimiter used between file name and extension is dot (.) | |

|When using DIR command, you will not see period or dot between file name and | |

|file extension on screen. | |

|- Directory display, dot indicated by spaces. | |

| | |

|ACTIVITY—USING A FILE NAME AS A VARIABLE PARAMETER | |

|Using a File Name as a Variable Parameter | |

|At command line with prompt A:\> . | |

|Activity steps. | |

|Key in following commands: | |

|DIR VENUS.TXT | |

|DIR NOFILE.TXT | |

|DIR STEVEN.FIL C:\WINDOWS\SYSTEM32\ | |

|DIR LONGFILENAME | |

|DDIR LONGFILENAME.EXTENSION | |

|DIR Sandy and Patty.txt | |

|DIR “Sandy and Patty.txt” | |

|DIR /X/P | |

|Continue pressing key until you reach end of display. | |

|Activity completed. | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

|COMMAND LINE EDITING | |

|Command Line Editing |SECTION 2.7 (pp. 48-52) |

|Can reuse last command keyed in without re-keying it. |Slide 31 |

|Use to recall command line one letter at a time. | |

|Use to recall entire command line. |Discuss all parts of display with each command. |

|See PowerPoint slide # for Editing Keys Command Summary. |System message – File Not Found (Error message). |

| |Can enter more than one file specification with DIR command. |

|ACTIVITY—USING COMMAND EDITING |Can enter more than one parameter at one time when using DIR. |

|Using Command Editing |Can use DIR command with long file name. |

|“ACTIVITIES Disk—Working Copy” is in Drive A with A: \> displayed. |File extension can have more than three characters. |

|Activity steps. |Quotation marks used to treat long file name with spaces in it as one |

|Key in DIIR/P |unit. |

|Press key twice |Long file name has name that adheres to 8.3 naming convention (name |

|Cancel command and clear memory of command line editor. |called an alias). |

|Key in the following: |/X parameter - used to see 8.3 names. |

|CLS |8.3 name derived from LFN by removing spaces, taking first 6 characters|

|DIR FRANK.FIL |of file name and adding a tilde (~) and a number. |

|DIR VEN.99 |Good idea to keep file names short/concise |

|VOL |Less chance of making typo |

|DIR JUP.99 |LFNs take up needed room on floppies. |

|DIR ORION.NEB |Discussion Question (10) – What is used to separate a file |

|DIR DRESS.UP RIGHT.UP |specification from a path name? |

|Press following keys. | |

|Up arrow key 2 times. |SECTION 2.8 (p. 53) |

|Down arrow key once. |Slides 32-35 |

| + one time. |Discussion Question (10) – If you keyed in 10 commands and wanted to |

| key |reuse a command previously keyed in, what could you do? |

|At cursor key, key in: FILE3.FP. | |

|Press following keys: | |

| then up arrow key twice. | |

| + left cursor one time. |SECTION 2.9 (pp. 54-57) |

|Key in: FILE3.FP |Slide 36 |

|Press . | |

|Press /number that appears before DIR VEN>99 (in this case 2) |Discuss results of editing key used in this activity. |

|Press //D/. |Editing keys can be used to recall and edit commands. |

|Press / + |Overstrike mode – replaces each character you key in data. |

|Press up arrow key once. |Insert mode –“inserting data” at the cursor. |

|Close Command Prompt window. |Use shortcut ( key) to delete line quickly. |

|Activity completed. |Can search for previously entered command by keying in first letter/s |

| |of command you are interested in. |

|DRIVES AS DEVICE NAMES | |

|Drives as Device Names | |

|Device is a place to read information from or write information to. | |

|Disk drives have device names (followed by a colon) assigned so Windows knows| |

|where to read or write. | |

|Drive names on stand-alone computers are typically A:, B:, or C:. | |

|If on network, disk drive letters can vary. | |

|Other common devices to read information from or write information to: | |

|Keyboard. | |

|Printer. | |

|Monitor. | |

| | |

|DEFAULTS | |

|Defaults | |

|Implied instructions. | |

|When you don't tell the computer what to do, it makes assumptions. | |

|Computer assumptions are called defaults. | |

|When prompt is A:> | |

|Tells you A is the default drive. |SECTION 2.10 (pp. 57-58) |

|Any command given will assume the default unless otherwise specified. |Slides 37-38 |

|The displayed prompt is the default, designated, or logged drive. | |

|In Explorer default drive indicated on title bar. |Disk drive is an example of a device. |

| |Discuss what drive names are in the lab. |

| |First floppy disk is called A: |

| |First hard disk is called C: |

| |Discussion Question (11) - What is the function and purpose of a |

| |device? |

| | |

| | |

| | |

|ACTIVITY—WORKING WITH DEFAULTS | |

|Working with Defaults | |

|“ACTIVITIES Disk-Working Copy” in Drive A. | |

|Activity steps. | |

|Open Command Prompt window. | |

|Key in the following: | |

|A: |SECTION 2.11 (p. 58) |

|DIR |Slides 39-=40 |

|DIR A: | |

|C: |Default - very important concept. |

|CD \ |Value used unless another value is specified. |

|DIR A: |Default drive is drive commands will operate on unless other |

|DIR HELLO.TXT |information is given. |

|DIR A: HELLO.TXT |Remind students that these rules apply to application software as well.|

|Activity completed. |Default drive, designated drive, and logged drive are the same. |

| |Discussion Question (12) - Explain the function and purpose of the |

|A BRIEF INTRODUCTION TO SUBDIRECTORES—THE PATH |default drive. |

|A Brief Introduction to Subdirectories—The Path |Discussion Question (13) - How can you tell which drive is the default |

|Subdirectories are used primarily on hard disks. |drive? |

|Allows grouping of files by type. | |

|Allows disk to be divided into smaller, more manageable sections. | |

|Windows refers to subdirectories as folders. | |

|Graphically represented with folder icons. |SECTION 2.12 (pp. 58-62) |

|In command line shell folders referred to as directories and subdirectories. |Slide 41 |

|Subdirectories can contain other subdirectories. | |

|In C:\MYFILES\REPORTS\REP.DOC |“Shelling out to DOS” or “shelling out to command line” – when open |

|First backslash (\) always represents root directory. |Command Prompt window and changed default drive to A. |

|The other backslashes are delimiters - separators between elements in the |If on network hard drive letter may not be C: |

|path. |Discuss using default vs. giving drive to be searched. |

|(elements being subdirectories). |DIR A: HELLO TXT – very clear request – drive designator preceded file |

|Every disk comes with one directory named by operating system. |name. |

|Other subdirectories are created and named by user. | |

|Rules for naming are same as for naming files. | |

|Do not usually have extensions. | |

|Subdirectory name is called the path name. | |

|Path is route followed by operating system to locate, save, and retrieve a |SECTION 2.13 (pp. 62-63) |

|file. |Slides 42-49 |

|When you see "path" in a syntax diagram substitute the directory name or | |

|names. |Subdirectories used with large storage media, i.e., RW-CDs or Zip |

| |disks. |

|ACTIVITY—USING PATH WITH THE DIR COMMAND |Technically, only one directory (the root), all others are |

|Using Path with the DIR Command |subdirectories. |

|“ACTIVITIES Disk-Working Copy” in Drive A. C: \> is displayed. |Terms "directory" and "subdirectories" used interchangeably in this |

|Activity steps. |text. |

|Key in: |Subdirectories can be used on any disk - hard or floppy. |

|DIR A: |Directory/subdirectory names cannot be letters of the alphabet. |

|DIR A:\DATA |Letters of the alphabet are reserved for disk drive names. |

|DIR A:\DATA\THIN.EST |Forward slashes (/) for parameters. |

|Activity completed. |Backslashes (\) for directories. |

| |Use analogy of file cabinet (disk) and drawer (subdirectory). |

|CHANGING DEFAULTS |Discussion Question (14) - Define default subdirectory. |

|Changing Defaults |Discussion Question (15) - How can you tell which directory is the |

|Default drives can be changed so OS automatically uses drive displayed on |default subdirectory? |

|screen as default drive. | |

|Text assumes C:\WINNT\SYSTEM32. | |

|Be sure filled out information on Configuration Table in Chapter 1.6. | |

| | |

| | |

|ACTIVITY—CHANGING THE DEFAULT DRIVE | |

|Changing the Default Drive | |

|“ACTIVITIES Disk—Working Copy” in Drive A. C: \> is displayed. | |

|Activity steps. | |

|Change default to A:\> | |

|Key in: |SECTION 2.14 (pp. 63-65) |

|DIR |Slide 50 |

|DIR C:\ | |

|DIR C:\WINDOWS\SYSTEM32\ | - indicates subdirectory listing. |

|Activity completed. |Use of backslash as delimiter for path names. |

| |Backslash. |

|CHANGING DIRECTORIES |First \ is the root directory. |

|Changing Directories |Other \’s are delimiters. |

|Default directory can be changed as easily as default drive. | |

|Once default drive is established can establish default directory. | |

|- Do not need to specify path as default is specified. | |

|To change directory, key in CD (change directory), followed by the directory |SECTION 2.15 (p. 65) |

|(path) name. |Slide 51 |

|If you key in CD with no parameters, the directory that is current is the | |

|default directory. |Command line is not case sensitive. |

|To change drives at same time as you change directories, use /D parameter. |Inform students of any differences in your lab. |

| |Prompt displayed on screen could look different from textbook prompt. |

|ACTIVITY—CHANGING DIRECTORIES | |

|Changing Directories | |

|“ACTIVITIES Disk—Working Copy” is in Drive A. A: \> is displayed. | |

|Activity steps. |SECTION 2.16 (pp. 65-67) |

|Key in the following: |Slide 52 |

|C: | |

|CD |Stress importance of noticing default drive. |

|CD \WINDOWS\SYSTEM32 |Emphasize that C:\ is major subdirectory for most users. |

|DIR |Discussion Question (16) - What steps must be done to change the |

|CD |default drive? Why would you change the drives? |

|CD /D A:\DATA |Discussion Question (17) – What does A:\> mean? |

|DIR | |

|CD \ |SECTION 2.17 (p. 67) |

|Activity completed. |Slides 53-55 |

| |Discussion Question (19) – What steps must be done to change a |

|GLOBAL FILE SPECIFICATIONS: WILDCARDS, THE ?, AND THE * |directory? Why would you change a directory? |

|Global File Specifications: Wildcards, (?, and *) | |

|Allow you to work with a group of files. | |

|Formally called global file specifications. | |

|Informally called wildcards. | |

|* represents a group of characters. | |

|? represents a single character. | |

|Techniques used here will also apply in Search in the GUI (in Windows | |

|Desktop). | |

| | |

| | |

| | |

| | |

|ACTIVITY—DIR AND WILDCARDS | |

|DIR and Wildcards | |

|“ACTIVITIES Disk—Working Copy” in Drive A:. A: \> is displayed. | |

|Activity steps. |SECTION 2.18 (pp. 67-69) |

|Key in: C: |Slide 56 |

|Key in: CD \WINDOWS\SYSTEM32 | |

|Key in the following: |CD keyed in alone will display current default directory. |

|DIR G |CD followed by path (directory name) will change default directory. |

|DIR G*.* |CD \ will always return to root directory. |

|DIR *.SYS |First backslash always means root directory and other backslash is a |

|DIR A:\*.TXT |delimiter. |

|DIR A:\?????.TXT |Discussion Question (20) – What is the significance of the first |

|DIR A:\EXP*.* |backslash in a command? |

|DIR A:\EXP99*.* | |

|DIR A:\EXP??JAN.* | |

|CD \ |SECTION 2.19 (pp.69-70) |

|Activity completed. |Slides 57-58 |

| | |

| |DIR command & file name find one specific file. |

| |Global file specifications to find group of files. |

|REDIRECTION |Use analogy of playing cards where joker can stand for another card of |

|Redirection |your choice. |

|Keyboard = standard input device. |Discussion Question (20) - Define global file specifications. |

|Screen (monitor) = standard output device. | |

|Redirection tells OS to redirect output somewhere else. |SECTION 2.20 (pp. 70-75) |

|Usually to file or printer. |Slide 59 |

|Printer. | |

|Must be local, not network printer. |Stress importance of knowing directory where the files are located. |

|Works only with commands that write to standard output. |Emphasize that even though DIR G will find files, should get used to |

|Redirection works with DIR. |using DIR G*.* |

|Does not work with all commands. |Examples of using *. |

|Syntax is: |Compare using * and ? |

|COMMAND > DESTINATION |If group has common file extension .SYS can display files using wild |

|Space req. on both sides of >. |cards *.SYS |

| |Discussion Question (22) - How are wildcards used? |

|ACTIVITY—REDIRECTING OUTPUT TO A FILE |Discussion Question (22) - If you see C:\WINNT\SYSTEM32> on the screen,|

|Redirecting Output to a File |what does it mean? |

|“ACTIVITIES Disk—Working Copy” in Drive A. C:\ is displayed. | |

|Activity steps. | |

|Key in: A: |SECTION 2.21 (pp. 75-76) |

|Key in: DIR *.NEW |Slides 60-62 |

|Key in: DIR *.NEW > MY.HW | |

|Key in: DIR MY.HW |Must use correct device name for printer. |

|Activity completed. |- PRN for default printer |

| |- LPT1, LPT2, LPT3 for printer attached to specific port. |

|REDIRECTING OUTPUT TO THE PRINTER |If using network printer must know name of network printer. |

|Redirecting Output to the Printer |Can name file. |

|Can redirect output of DIR command to printer to get a hard copy. |Devices have specific names. |

|Printer device name is PRN, LPT1, LPT2, and sometimes LPT3. | |

|PRN and LPT1 are usually synonymous. |Discussion Question (24) - What is the purpose and function of |

|Must know network printer name to redirect to network printer. |redirection? |

| | |

|ACTIVITY—REDIRECTING THE OUTPUT TO THE PRINTER | |

|Redirecting the Output to the Printer | |

|Can this activity be done in the lab? | |

|“ACTIVITIES Disk—Working Copy” in Drive A. A: \> is default. Printer on. |SECTION 2.22 (pp. 76-77) |

|Activity steps. |Slide 63 |

|Key in: DIR *.TXT | |

|Key in: DIR *.TXT > PRN. |Discuss how to deal with write-protected disks. |

|Activity completed. |Remind students that redirection is an “instead of” procedure. |

| | |

| | |

| | |

| | |

| | |

|GETTING HELP | |

|Getting Help | |

|Prior to DOS 5.0, was HELP in manual. | |

|Reference manual is called documentation. |SECTION 2.23 (pp. 77-78) |

|In DOS 6.0 and above, documentation found more online than in written form. |Slides 64-65 |

|For procedures/methods used in Windows GUI, use Help choice on Start menu. | |

|May get help on command line commands in GUI help. |Review how disk drives are named. |

|For help with command and syntax within DOS environment. |Any special printing procedures in lab? |

|Key in name of command followed by a space, a forward slash and question |Difference between numeral one and letter l. |

|mark. | |

|Use HELP followed by command name. | |

|Commands and syntax listed in Appendix B. | |

| | |

| | |

| | |

|ACTIVITY—GETTING HELP WITH A COMMAND |SECTION 2.24 (pp. 78-79) |

|Getting Help with a Command |Slides 66-67 |

|ACTIVITIES Disk—Working Copy” in Drive A. Default drive/directory is A: \>. | |

|Activity steps. |NOTE: |

|Key in following commands: |- Are there special lab instructions? |

|DIR /? |- Is this a Read-only activity? |

|DIR /ON |- Need local printer to do this activity.- Unless your lab has |

|DIR /O-N |additional instructions. |

|DIR /S |Redirection is an “instead of” procedure. |

|DIR /BLP |Hardware solutions – manipulate hardware to get desired results. |

|DIR /B /L /P |--Done if page not ejected from local printer. |

|Press until end of display is reached. | |

|Key in: EXIT | |

|Initiate and complete Windows shut-down procedure. |SECTION 2.25 (pp. 79-80) |

|Activity completed. |Slides 68-70 |

| | |

| |Paper documentation still useful, i.e., if cannot boot system, what do |

| |you do? |

| |For procedures/methods in Windows GUI – good database info accessed via|

| |HELP choice on Start Menu. |

| |Discussion Question (25) - What would you do if you forgot the |

| |parameter for a wide DIR display? |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| | |

| |SECTION 2.26 (pp. 80-84) |

| |Slide 71 |

| | |

| |Review. |

| |- Commands – verbs OS acts upon. |

| |- Use of mouse. |

| |- Parameters available with DIR command. |

| | |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download