Instructor: Prof. Michael P. Harris Chapter 4
Answers to Discussion Questions Files & Folders
Chapter 4
Program Files, Data Files, and Subdirectories (Folders)
ANSWERS TO DISCUSSION QUESTIONS (pp. 174-175)
1. List three of the major categories of application software and briefly explain their functions.
Word Processors make writing easier.
Spreadsheets manage budgets and do financial projections.
Databases manage and manipulate a collection of data.
Graphics/desktop publishing create artistic drawings and designs, newsletters, brochures, etc.
2. What is the purpose and function of a program file (application program)?
Application programs are used to create and manipulate data. Typically, application programs help the user solve a problem, e.g., automate payroll, draw a picture, or write a letter.
3. Explain the purpose and function of the operating system when working with program files and data files.
The operating system is the means by which application programs are loaded into memory (all work takes place in memory). The OS also assists in loading data files into memory. It also ensures the cooperation between an application program and its data files. The operating system commands are used to manage and manipulate program and data files.
4. Briefly explain the difference between real-mode and protected-mode operation.
Real-mode operation is used for software written for DOS or early Windows versions. It is a single-task working environment. When an application program needed to interface with the hardware, the application program could “talk” directly to the device, or it could talk to DOS and DOS would do the actual labor.
Protected-mode operation is used for software written for Windows 2000 Professional operating system. No communication exists between the application software and the actual hardware itself. The manufacturer’s device drivers talk to virtual device drivers that are part of the Windows operating system. These virtual device drivers are outside of the core operating of the OS that remain protected from action of devices and device drivers. It is an operating mode in which different parts of memory are allocated to different programs. When programs are running simultaneously they cannot invade each others memory space as they use only their own memory space.
5. Explain documentation, update notices, and technical support.
Documentation (instructions that inform a user how to use hardware and/or software) comes in two forms--manuals and online help. Online help is becoming more common, more complex, and is gradually replacing manuals.
When you register a piece of software you will receive update notices (latest version or any corrections to the program). Frequently you will receive discounted or free upgrades to newer versions.
Technical support means that you can call the company and/or programmer/s to answer questions that you have, or problems that are not dealt with in the manual.
6. Name at least three file extensions that indicate an executable program.
Answers will vary. Three extensions that indicate an executable program include .EXE, .COM, and .BAT.
7. What is the purpose and function of the root directory? What symbol is used to represent the root directory?
Whenever a disk is formatted the root directory is always set up by the FORMAT command. This directory keeps track of files and subdirectories that are placed in the root directory of any disk. The root directory is represented by a backslash (\).
8. What is a subdirectory?
The subdirectory is any directory other than the root directory. A user or a program creates it.
9. Why would you want to create a subdirectory?
Subdirectories are created to help organize files on your disks. When you create directories, you are developing a category and classification scheme. This allows you to quickly locate files and to manage the numerous files and programs that you create and collect.
Subdirectories are also created to defeat the limitation the OS places on the number of files that can be in the root directory. By creating subdirectories, the files on a disk are only constrained by the disk space itself.
10. What is a parent directory?
The parent directory is the directory that is one level above the current directory.
11. Explain the purpose and function of three directory management commands.
The directory management commands are MD, CD, RD, PATH, PROMPT, and MOVE.
· MD is used to create new directories.
· CD changes a directory.
· RD is used to remove or erase a directory and its subdirectories.
· PATH is used to define the search paths.
· PROMPT is used to change the look of the prompt to identify what subdirectory is the default.
· MOVE allows you to rename a directory.
12. Give the syntax for creating a subdirectory.
The syntax for creating a subdirectory:
MKDIR [drive:] path or
MD [drive:] path
Path can be relative either to the current directory or the root directory. Both commands are identical, but use the shorter one as it requires less keystrokes.
13. Give the syntax for the CD command.
The syntax for the CD command:
CD [drive:] [path]
Path is relative to either the current directory or the root directory.
14. What is the difference between the absolute path and a relative path?
The absolute path is the complete and total hierarchical structure. You start at the top (root directory) and work your way down through every subdirectory without skipping a directory. The absolute path is always correct.
The relative path only requires you to give the path name relative to your current directory and does not necessarily begin with a backslash.
15. If you wanted to create a subdirectory called JAIL under the subdirectory called COURT on Drive A:, would you get the same result by keying in either MD A:\COURT\JAIL, or MD A:\JAIL? Why or why not?
These two commands would create different subdirectories. The first, MD A:\COURT\JAIL, would perform the desired action and create JAIL under COURT. The second, MD A:\JAIL, would make a subdirectory JAIL in the root directory of Drive A.
16. What are subdirectory markers? How can they be used?
Subdirectory markers are shortcuts to using subdirectories. The single dot (.) represents the current directory itself while the double dot (..) represents the name of the parent directory. You can use (. .) to move up the subdirectory tree structure. You cannot use
(. .) to move down the hierarchy.
17. What are metastrings?
Metastrings are strings of characters that can be used to represent other things. When you include one of these metastrings, it establishes a specific value. Metastrings always have the syntax $x where x represents any of the values on page 153. For example, in the PROMPT command the metastrings $P represents the current drive and path.
18. How can you return the prompt to the default value? Would you want to?
To return the prompt to the default value issue the PROMPT command with no parameters. (Rest of answer will vary.)
19. Explain the purpose/function of the MOVE command. Explain the syntax.
MOVE allows you to rename files and directories from the command prompt.
MOVE [/Y | /-Y] [drive:] [path] dirname1 dirname2.
· MOVE is the command
· /Y and /-Y are the prompts
· [drive:][path] dirname1 specifies name of file you want to rename.
· dirname2 specifies new name of directory.
20. Why will the RD command without parameters not remove a directory if there is a file in it?
The RD command can only remove empty directories.
21. What steps must be followed to remove a directory with RD?
· Delete all files from the directory.
· Remove any subdirectories with RD subdirectory
· Use RD to remove the directory.
Remember that you cannot remove the directory you are in. The RD /S replaced DELTREE and if you use the /S parameter, RD will remove the entire directory tree, deleting files and directories in the designated directory.
22. What is the purpose and function of the PATH command?
PATH is an internal command that allows the user to tell the OS on what disk and in what subdirectory to search for command files. The OS will only search the path for executable files (extensions of .EXE,.COM, or .BAT).
PATH [[drive:] path [;...] [;%PATH%]]
23. How can you cancel the current path?
If you key in PATH ;, it will cancel the current path.
24. How can you set a multiple search path?
It is possible to have multiple search paths. To instruct the operating system to do this, you have to include all the directories you want searched in your PATH command and separate the directories with a semicolon.
25. What is the difference between the path to a file and using the PATH command?
The path to a file is given when you specify a specific file. The PATH command lists directories where the OS would look when you try to execute a program that does not exist in the current default drive and directory.
Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line
Franklin, Beedle & Associates, Inc. 2003© ISBN: 1-887902-80-1 Page 4