Ch04Power - Program Files, Data Files, and Subdirectories...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Program Files, Data Files, and Subdirectories Ch 4 1 Overview The cooperative effort between the operating system and the application program and its data files will be discussed. Ch 4 2 Overview Shareware and freeware will be compared and contrasted. Ch 4 3 Overview Will learn to differentiate between a program file and a data file. Ch 4 4 Overview The hierarchical filing system of a tree-structured directory will be explained. Ch 4 5 Overview Will identify and use subdirectory commands to help manage files from the command prompt. Ch 4 6 Why Use the Command Why Prompt Screen? Prompt Review commands learned: ² FORMAT ² DISKCOPY ² DIR ² CLS Ch 4 7 Why Use the Command Why Prompt Window? Prompt Four major categories of application programs: ² Word processors ² Spreadsheets ² Databases ² Graphics Ch 4 8 Why Use the Command Why Prompt Window? Prompt OS is important: ² Manages the system. ² Enables the user to manage and manipulate files on disks Ch 4 9 Why Use the Command Why Prompt Window? Prompt The OS manages the files not the information put into files. Ch 4 10 Program Files, Data Program Files, and the OS Files, ²WUGXP Subdirectory contains: ² Games which contains ²BOG2 which contains ²Application program called BOG Ch 4 11 Program Files, Data Program Files, and the OS Files, Legacy software can be used by Windows OS because of downward compatibility. Ch 4 12 Program Files, Data Program Files, and the OS Files, MS-DOS commands work in conjunction with various types of files. Ch 4 13 Program Files, Data Program Files, and the OS Files, Real mode operation: ² Used for software written for DOS and early versions of Windows ² Application program interfaces with device or DOS and DOS does the work Ch 4 14 Program Files, Data Program Files, and the OS Files, Protected mode operation: ² Used for Windows software ² Application software does NOT interface with hardware ² Drivers talk to virtual device drivers Ch 4 15 Program Files, Data Program Files, and the OS Files, Operating system: ² Loads application program into memory ² Assists in loading data file into memory ² Ensures cooperation between application program and its data files Ch 4 16 Program Files, Data Program Files, and the OS Files, Commands: ² Are programs ² Allow user to interface with OS to manage programs and data files Ch 4 17 Shareware Freeware & shareware programs available from a wide variety of sources. Ch 4 18 Shareware Freeware: ² Software that is in the public domain Ch 4 19 Shareware Shareware: ² Trial version of a program Ch 4 20 Shareware Register shareware program to receive: ² Full version with documentation ² Update notices ² Technical support Ch 4 21 Shareware Appendix A lists all shareware programs with fees and addresses necessary to register them. Ch 4 22 Activity—Using DIR to Activity—Using locate the BOG Program locate KEY CONCEPTS: ² Use DIR command to verify BOG is on hard disk ² Function of .exe and .dat Ch 4 23 Using Application Using Programs & Data Files Programs ² DIR command acknowledges files exist. memory. ² To use file, must load it into Ch 4 24 Using Application Using Programs & Data Files Programs ² BOG.EXE is the application program. ² BOG.DAT is the data file. Ch 4 25 Activity—Using Activity—Using Application Programs and Data Files KEY CONCEPTS: Only programs can be executed ² Function of file extension ² BOG.DAT is the data file ² Ch 4 26 Managing Program and Managing Data Files at the Command Prompt Command Organize programs and files into subdirectories so it will be easier to save and locate them. Ch 4 27 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or Root directory: ² Created when disk is formatted ² Represented by (\) - the backslash ² Acts as an index to disk Ch 4 28 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or Table 4.1 FAT16 Root Directory File Limits p. 135 Table Ch 4 29 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or ² FAT16 ¯Root directory - fixed size & location on disk ² FAT32 ¯Root directory free to grow as necessary ² NTFS ¯No limit to # of files/directories in root directory Ch 4 30 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or Subdirectories: ²Important part of organizing disk ²Can contain subdirectories ²No limit in number of files Ch 4 31 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or Subdirectory structure: ²Looks like inverted family tree ²Root directory ¯At top of tree ¯Point of entry in hierarchical structure Ch 4 32 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured Fig 4.1 A Directory Is Like a Family Tree p. 135 Ch 4 33 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured Fig 4.2 Hierarchical Structure of a Directory p.136 Ch 4 34 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured Fig 4.3 A disk as a Building p. 136 Ch 4 35 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured Fig 4.4 Subdirectories as Rooms p.137 Ch 4 36 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured Fig 4.5 More Subdirectories p. 137 Ch 4 37 Hierarchical Filing Systems Hierarchical or Tree-Structured Directory or Fig 4.6 Files in Subdirectories p. 138 Ch 4 38 Hierarchical Filing Systems or Hierarchical Tree-Structured Directory Tree-Structured General comments: ² Only one root directory - point of entry ² Directories ¯ Have only one parent directory ¯ Can have any # of child directories Ch 4 39 Hierarchical Filing Systems or Tree-Structured Directory General comments: ² Each subdirectory ¯ Dependent upon structure above it ¯ Knows only its parents and children ² Not changing size of structure - merely organizing it Ch 4 40 Hierarchical Filing Systems or Tree-Structured Directory General Comments: ² User names the subdirectories not the root directory ² Subdirectories ¯ Follow file naming rules ¯ Have special commands Ch 4 41 Table 4.2 Directory Management Commands p. 139 Hierarchical Filing Systems or Tree-Structured Directory Ch 4 42 Creating Subdirectories ² Format disk - preparing it to hold files. ² Set up subdirectory - preparing it to hold logical group of files. Ch 4 43 Creating Subdirectories Subdirectory command syntax: MKDIR [drive:] path MD [drive:] path Ch 4 44 or Activity—How to Activity—How Create Subdirectories Create KEY CONCEPTS: ² USED /Q parameter to format disk and used shortcut to place volume label on disk ² Determine when at root directory ² Verify subdirectory created ² Attributes (D, H, S, R, A, -) ² Use DIR to display directory contents ² Subdirectory has two named subdirectories ¯ Dot and double dot Ch 4 45 The Current Directory Operating system keeps track of: ² Default drive ²Current disk (default) directory for each Ch 4 46 The Current Directory CD command: ² Displays current default directory: ¯ CD with no parameters Changes default directory: ¯ Parameter after CD CD [drive:][path] Ch 4 47 ² The Current Directory ²CD command does not use spaces as delimiters. ²Syntax ¯CD [/D] [drive:] [path] Ch 4 48 The Current Directory What happens if prompt is A:\> and you key in: ² CD C:\WUGXP ² C: ² CD /D C:\WUGXP Ch 4 49 Activity—Using the Activity—Using CD Command CD KEY CONCEPTS: ² Results of keying in CD ¯ With no parameters ¯ Followed by subdirectory name ² CD alone cannot be used to change drives ² Results of keying in DIR Ch 4 50 Relative and Absolute Paths Use MD or MKDIR command to make new subdirectories. MD [drive:] path Ch 4 51 Relative and Absolute Paths p. 147 Fig 4.7 Directory with Subdirectories Ch 4 52 Relative and Absolute Paths Absolute path: ² Direct route from root directory to the subdirectory of interest ² Is always absolutely correct ² Complete and total hierarchical structure Ch 4 53 Relative and Absolute Paths Relative path: ² Route from where you are to where you want to go ² Can move to directory above it and beneath it Ch 4 54 Relative and Absolute Paths ²Directory: ¯ Knows about files/directories within itself ¯ Knows about its immediate child directory and parent directory ² To move to another parent directory must return to the root Ch 4 55 Relative and Absolute Paths The root directory is parent or common “ancestor” of all directories. Ch 4 56 Activity—Creating Activity—Creating More Subdirectories More KEY CONCEPTS: Absolute vs. relative path ² Hierarchy ² File vs. directory ² Create subdirectories ² When and when not to use \ ² Ch 4 57 Knowing the Default Directory It is important to know default drive and directory. Ch 4 58 Knowing the Default Directory ² PROMPT command without parameters displays current drive and > sign. current drive and directory. Ch 4 ² CD command displays default or 59 PROMPT Command ² If no prompt specified prompt includes path and >. ² Changing way prompt is displayed does not change its function. Ch 4 60 PROMPT Command PROMPT command: ² Contained in CMD.EXE ² Syntax - PROMPT [text] ² Can include metastrings Ch 4 61 PROMPT Command PROMPT command Metastrings p. 153 Ch 4 62 PROMPT Command PROMPT Command Metastrings p. 153 Ch 4 63 Activity—Changing Activity—Changing the Prompt the KEY CONCEPTS: ² Changing appearance of prompt does not change its function ² Important to display default drive letter ² Can return prompt to default value by keying in command with no parameters Ch 4 64 Subdirectory Markers ² Single . (one period) - specific name of current directory. ² Double . . (two periods) - specific name of parent directory of current subdirectory. Ch 4 65 Subdirectory Markers ²Can use . . (two periods) to move up the directory. use shortcut symbol to move down hierarchy. Ch 4 66 ²Cannot Activity—Using Activity—Using Subdirectory Markers Subdirectory KEY CONCEPTS: ² Using . . (two periods) ² Space after CD/MD command & before backslash or directory marker is optional ² When to use relative path ² When to use absolute path ² Keying in CD. . vs. keying in CD \ Ch 4 67 Activity—Using Activity—Using Subdirectory Markers Subdirectory KEY CONCEPTS: ² What happens if MD \GOLF keyed in instead of MD PHYSED\GOLF ² Results of keying in CD \ or CD\ Ch 4 68 Activity—Using Activity—Using Subdirectory Markers Sig 4.8 Structure of the Data Disk p. 158 ubdirectory F Fig 4.8 Structure of the Data Disk p. 158 Ch 4 69 Activity—Using Activity—Using Subdirectory Markers S4.9 Subdirectories: Another View p. 159 ubdirectory Fig Fig 4.9 Subdirectories: Another View p. 159 Ch 4 70 Changing the Names Changing of Directories of MOVE command: ² Used to rename directory from the MS-DOS prompt ² MOVE [/Y | /-Y] [drive:] [path] ¯dirname1 direname2 Ch 4 71 Activity—Using MOVE Activity—Using to Rename a Directory to KEY CONCEPT: ² Give correct path name (absolute or relative) and can rename a directory from any location Ch 4 72 Removing Directories RD or RMDIR command: ² Used to remove directories ² Cannot remove ² Cannot use with wildcards Ch 4 ¯ Directory containing hidden or system files ¯Directory you are in ¯ Default subdirectory ¯ Root directory 73 Removing Directories RD [/S] /Q] [drive:] path Without parameters: ² Removes: ¯ Only empty subdirectories ¯ Files one at a time - bottom up Ch 4 74 Removing Directories RD [/S] /Q] [drive:] path With parameters: ² Can remove directory tree ² Can remove directory with hidden or system files ² Can traverse directory tree from top down Ch 4 75 Activity—Using the RD Activity—Using Command Command KEY CONCEPTS: ² Directory is type of file ² Cannot delete ¯ Directory you are in ¯ Default directory ¯ Root directory Ch 4 76 Activity—Using the RD Activity—Using Command Command KEY CONCEPTS: ² Create directories - top down ² RD without parameters ¯ Remove directories - bottom up ¯ Removes empty directories Ch 4 77 Deleting a Directory Deleting and Its Subdirectories and RD [/S] [/Q] [drive:] path RD with /S parameter: Deletes directory and contents (subdirectories/files) with one command ² Removes a tree ² Ch 4 78 Deleting a Directory Deleting and Its Subdirectories and RD with /S parameter: ² Traverse directory tree from top down ² With /Q parameter - RD runs in quiet mode ² Useful, fast, powerful, dangerous Ch 4 79 Activity—Using RD with Activity—Using the /S Parameter the KEY CONCEPTS: ² RD /S ¯ Removes files and subdirectories with one command ¯ Useful, fast, powerful, dangerous Ch 4 80 Using Multiple Parameters Using with MD and RD with Can create (MD) or remove (RD) more than one directory on the same command line. Ch 4 81 Using Multiple Parameters Using with MD and RD with MD command: ²Create parent and child directory with one command. ²If parent directory does not exist, the OS will create child directories and any necessary intermediate directories. Ch 4 82 Activity—Using Multiple Activity—Using Parameters with MD & RD Parameters KEY CONCEPTS: Creating subdirectories with MD ² Removing subdirectories with RD ² Using /S and /Q parameters with RD ² Ch 4 83 Understanding the PATH Understanding Command Command Covered in this chapter: ² CD command ² Located/executed BOG ² Reviewed process of executing a program ¯ .com, .exe, and .bat extensions denote executable programs ² Used MD, DIR, CD, RD PROMPT, FORMAT, DISKCOPY, and MOVE Ch 4 84 Understanding the PATH Understanding Command Command OS Search for Correct File is Limited to File OS Extensions in Order Listed p.168 Extensions Ch 4 85 Understanding the PATH Understanding Command Command PATH command: ² Locates/executes executable program files ² Searches ¯ Memory ¯ Current directory ¯ Subdirectories specified with PATH command Ch 4 86 Understanding the PATH Understanding Command Command PATH command syntax: PATH [[drive:] path [;…] [%PATH%]] Ch 4 87 Activity—Using the Activity—Using Path Command Path KEY CONCEPTS: Use of ; following PATH command ² Location of BOG ² Elements of path separated by (;) ² No need to replace existing PATH to change it ² Returning PATH to original setting ² Ch 4 88 ...
View Full Document

This note was uploaded on 04/05/2010 for the course CIS CIS 103 taught by Professor Dorisdunn during the Winter '09 term at Skagit Valley College.

Ask a homework question - tutors are online