Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards.

Similar presentations


Presentation on theme: "Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards."— Presentation transcript:

1 Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards

2 Ch 22 Overview Will learn to read a syntax diagram and explain the function of each part of the diagram.

3 Ch 23 Overview Will learn some basic commands, their syntax, and how to make commands more specific.

4 Ch 24 Overview Will be able to define prompts and explain how they are used.

5 Ch 25 Overview The purpose and function of defaults will be explained.

6 Ch 26 Overview Will learn how to change the default drive and directory.

7 Ch 27 Overview Will learn how to use subdirectories and wildcards with the DIR command.

8 Ch 28 Overview 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.

9 Ch 29 Overview Will learn to use the Online Help feature.

10 Ch 210 Command Syntax All languages have rules or conventions for speaking and writing.

11 Ch 211 Command Syntax To communicate with computer at command line prompt: è Learn its language ( commands ) è Follow its syntax ( word order ) è Use correct punctuation

12 Ch 212 Command Syntax The graphical user interface in Windows operating system uses syntax and rules.

13 Ch 213 What Are Parameters? Parameter: è Information to modify or qualify a command

14 Ch 214 What Are Parameters? Parameters can be: è Variable è Fixed

15 Ch 215 What Are Parameters? Variable parameter: è x + y = z

16 Ch 216 What Are Parameters? Fixed parameter: è x + 5 = z

17 Ch 217 Reading a Syntax Diagram Command line interface language has: è Vocabulary ( commands ) è Grammar ( punctuation ) è Syntax ( order )

18 Ch 218 Reading a Syntax Diagram DIR command syntax used earlier: DIR [drive:] [path] [filename] [/A [[:] attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:] sortorder]] [/P] [/Q] [/S] [/T[[:] timefield]] [/W] [/X] [4]

19 Ch 219 Using Fixed Parameters with the DIR Command Fixed parameter: è Referred to as a switch. è Begins with / ( the slash ).

20 Ch 220 Using Fixed Parameters with the DIR Command è Slash = forward slash (/). è \ = Backslash.

21 Ch 221 Using Fixed Parameters with the DIR Command DIR command with /P parameter displays one screen of information at a time.

22 Ch 222 Using Fixed Parameters with the DIR Command Notes for lab activities: è Check notes at beginning of each activity è At end of work session return to Windows desktop and follow shut-down procedure è Know your laboratory procedures è If system varies from text refer to the Configuration Table in Chapter 1.6

23 Ch 223 Activity—Using Fixed Parameters with DIR Command KEY CONCEPTS: è Clear Screen è Display directory using:  /P parameter  /W parameter  /P /W parameters è Delimiter

24 Ch 224 Using File Names as Variable Parameters File specification ( name ) consists of: è File name è File extension

25 Ch 225 Using File Names as Variable Parameters Conventions for Naming Files è All files in directory (subdirectory) must have unique names. è File names - mandatory - may be less than but no longer than 256 characters è File extensions - usually three characters long. è Following characters illegal - may NOT be used in file name: \ / : * ? | è All other characters, including periods and spaces, are legal in Windows file names.

26 Ch 226 Using File Names as Variable Parameters è File name reflects subject of file. è File extension usually given by application creating file.

27 Ch 227 Using File Names as Variable Parameters When naming files, many older 16-bit application packages adhere to older 8.3 DOS rules.

28 Ch 228 Using File Names as Variable Parameters è Can locate specific file by using file name. è Give DIR command information about file you seek: DIR [drive:] [path] [filename] [/P] [/W]

29 Ch 229 Using File Names as Variable Parameters è In some syntax diagrams you will see: [filename[.ext]] è If a file name has an extension, it must be included.

30 Ch 230 Using File Names as Variable Parameters A dot (.), delimiter, is used between file name and file extension. Example: MYFILE.TXT

31 Ch 231 Activity—Using a File Name as a Variable Parameter KEY CONCEPTS: è System messages è DIR command with long file names è File extensions - more than 3 characters è 8.3 file name è Use of quotation marks è Use of /x parameter è How 8.3 name derived from LFN è Reasons for keeping file names short/concise

32 Ch 232 Command Line Editing Can reuse last command keyed in without rekeying it: è - recalls one letter at a time è - recalls entire command line

33 Ch 233 Command Line Editing Table 2.1 Editing Keys Command Summary p. 53

34 Ch 234 Command Line Editing Table 2.1 Editing Keys Command Summary p. 53

35 Ch 235 Command Line Editing Table 2.1 Editing Keys Command Summary p. 53

36 Ch 236 Activity—Using Command Editing KEY CONCEPT: è Use editing keys to recall and edit commands è Overstrike mode è Insert mode è Delete line quickly by using key è How to search for previously entered command

37 Ch 237 Drives as Device Names Device is a place to read information from/to.

38 Ch 238 Drives as Device Names Disk drives have assigned device names.

39 Ch 239 Defaults Default: è Implied instructions è Value used unless another value is specified

40 Ch 240 Defaults As an example, when A: \ > is displayed on screen it is the: è Prompt è Default drive è Designated or logged drive

41 Ch 241 Activity—Working with the Default KEY CONCEPTS: è “Shelling out to DOS” è Using Default drive è Determining drive to be searched è Why DIR A: HELLO TXT is a very clear request

42 Ch 242 Brief Introduction to Subdirectories—The Path Brief Introduction to Subdirectories—The Path Subdirectories: è Used primarily on hard disks

43 Ch 243 Brief Introduction to Subdirectories—The Path Brief Introduction to Subdirectories—The Path Subdirectories permit the... î grouping of files by type. î disk to be divided into smaller more manageable sections.

44 Ch 244 Brief Introduction to Subdirectories—The Path Brief Introduction to Subdirectories—The Path

45 Ch 245 Brief Introduction to Subdirectories—The Path Root directory: è Created and named by OS when disk is formatted è Indicated by the backslash (\)

46 Ch 246 Brief Introduction to Subdirectories—The Path è Other subdirectories created and named by user. è Naming rules same as rules for naming files.

47 Ch 247 Brief Introduction to Subdirectories—The Path  First backslash - root directory  Following backslashes – delimiters.

48 Ch 248 Brief Introduction to Subdirectories—The Path Path: è Route followed by OS to locate, save, and/or retrieve a file è Subdirectory name

49 Ch 249 Brief Introduction to Subdirectories—The Path Fig 2.1 File Cabinets and Subdirectories p.63 Brief Introduction to Subdirectories—The Path Fig 2.1 File Cabinets and Subdirectories p.63

50 Ch 250 Activity—Using Path with the DIR Command KEY CONCEPTS: è Delimiter for path names è Backslash (first and others)

51 Ch 251 Changing Defaults è Default drive can be changed. è Command line is not case sensitive.

52 Ch 252 Activity—Changing the Default Drive KEY CONCEPTS: è Changing default è Locating file not in default directory è C:\ - major subdirectory

53 Ch 253 Changing Directories Default directory can be changed.

54 Ch 254 Changing Directories Partial command syntax: è CD [/D][Drive:][path]

55 Ch 255 Changing Directories è CD with no parameters - current default directory. è CD followed by path name - change default. è /D parameter - change drive and directory.

56 Ch 256 Activity—Changing Directories KEY CONCEPTS: è Results of keying in  CD alone - display current default directory  CD followed by path - will change default directory  CD \ - will always return to root directory

57 Ch 257 Global File Specifications: Wildcards, the ?, and * Global file specifications ( wildcards ): è Can operate on group of files instead of just a single file

58 Ch 258 Global File Specifications: Wildcards, the ?, and * è * - represents a group of characters. è ? - represents a single character.

59 Ch 259 Activity—DIR and Wildcards KEY CONCEPTS: è Locating files with insufficient data è Using * and *.* è Using ? and ??? è Using *.SYS

60 Ch 260 Redirection Keyboard: è Standard input device Screen: è Standard output device

61 Ch 261 Redirection Redirection: è Changes output from monitor to somewhere else ( usually file or printer ) è To work with printer must be local printer è Works only with commands that write to standard output

62 Ch 262 Redirection Redirection syntax command: è COMMAND > DESTINATION (Space required on both sides of >)

63 Ch 263 Activity—Redirecting Output to a File KEY CONCEPTS: è Redirecting output to a file è Redirection is “instead of” procedure è Dealing with write-protected disks

64 Ch 264 Redirecting Output to the Printer è Can redirect computer output to a file or to a printer. è To redirect to printer need a local printer.

65 Ch 265 Redirecting Output to the Printer Printers device names: è PRN, LPT1, LPT2 and sometimes LPT3.

66 Ch 266 Activity—Redirecting the Output to the Printer KEY CONCEPTS: è Redirection è Hardware solutions

67 Ch 267 Activity—Redirecting the Output to the Printer Fig 2.2 Redirected Output p.79

68 Ch 268 Getting Help Documentation: è Reference manual that comes with any software package

69 Ch 269 Getting Help In DOS 6.0 and above, documentation provided less in written form and more online.

70 Ch 270 Getting Help For help in DOS environment: è Key in command, then a space, forward slash, and question mark è Use HELP followed by command name

71 Ch 271 Activity—Getting Help with a Command KEY CONCEPT: è Results of commands: ? ON O-N S BLP B/L/P E D


Download ppt "Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards."

Similar presentations


Ads by Google