1 / 71

Command Syntax Using the DIR Command with Parameters and Wildcards

Chapter 2. Command Syntax Using the DIR Command with Parameters and Wildcards. Overview. Will learn to read a syntax diagram and explain the function of each part of the diagram. Overview. Will learn some basic commands, their syntax, and how to make commands more specific. Overview.

devin
Download Presentation

Command Syntax Using the DIR Command with Parameters and Wildcards

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2 Command Syntax Using the DIR Command with Parameters and Wildcards Ch 2

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

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

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

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

  6. Overview Will learnhow to change the default drive and directory. Ch 2

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

  8. 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. Ch 2

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

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

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

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

  13. What Are Parameters? Parameter: • Information to modify or qualify a command Ch 2

  14. What Are Parameters? Parameters can be: • Variable • Fixed Ch 2

  15. What Are Parameters? Variable parameter: • x + y = z Ch 2

  16. What Are Parameters? Fixed parameter: • x + 5 = z Ch 2

  17. Reading a Syntax Diagram Command line interface language has: • Vocabulary (commands) • Grammar (punctuation) • Syntax (order) Ch 2

  18. 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] Ch 2

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

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

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

  22. 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 Ch 2

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

  24. Using File Names as Variable Parameters File specification (name) consists of: • File name • File extension Ch 2

  25. 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. Ch 2

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

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

  28. 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] Ch 2

  29. 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. Ch 2

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

  31. 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 Ch 2

  32. Command Line Editing Can reuse last command keyed in without rekeying it: • <F1> - recalls one letter at a time • <F3> - recalls entire command line Ch 2

  33. Command Line EditingTable 2.1 Editing Keys Command Summary p. 53 Ch 2

  34. Command Line EditingTable 2.1 Editing Keys Command Summary p. 53 Ch 2

  35. Command Line EditingTable 2.1 Editing Keys Command Summary p. 53 Ch 2

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

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

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

  39. Defaults Default: • Implied instructions • Value used unless another value is specified Ch 2

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

  41. 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 Ch 2

  42. Brief Introduction to Subdirectories—The Path Subdirectories: • Used primarily on hard disks Ch 2

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

  44. Brief Introduction to Subdirectories—The Path Ch 2

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

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

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

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

  49. Brief Introduction to Subdirectories—The PathFig 2.1 File Cabinets and Subdirectories p.63 Ch 2

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

More Related