Hardware Reference
In-Depth Information
As an example, the following file specification refers to a file named MOUSE
and having a COM filetype found in the root directory of the disk in drive A:
A\:MOUSE.COM
DOS allows files to be grouped together within directories and sub-
directories. Directory and sub-directory names are separated by means of the
backslash ( \ ) character. Directories and sub-directories are organized in an
hierarchical (tree) structure and thus complete file specifications must include
directory information.
The root or base directory (i.e. that which exists at the lowest level in the
hierarchical structure) is accessed by default when we simply specify a drive
name without further reference to a directory. Thus:
C:\MOUSE.COM
refers to a file in the root directory whilst:
C:\DOS\MOUSE.COM
refers to a identically named file resident in a sub-directory called 'DOS'.
Sub-directories can be extended to any practicable level. As an example:
C:\DOS\UTILS\MOUSE\MOUSE.COM
refers to a file named MOUSE.COM present in the MOUSE sub-directory which
itself is contained within the UTILS sub-directory found within a directory
named DOS.
When it is necessary to make explicit reference to the root directory, we can
simply use a single backslash character as follows:
C:\
File extensions
The filetype extension provides a convenient mechanism for distinguishing
different types of file and DOS provides various methods for manipulating
groups of files having the same filetype extension. We could, for example,
delete all of the back-up (BAK) present in the root directory of the hard disk
(drive C:) using a single command of the form:
ERA C:\*.BAK
Alternatively, we could copy all of the executable (EXE) files from the root
directory of the disk in drive A: to the root directory on drive C: using the
command:
COPY A:\*.EXE C:\
Commonly used filetype extensions are shown in Appendix H on page 470.
Wildcard characters
DOS allows the user to employ wildcard characters when specifying files. The
characters, '*' and '?', can be used to replace complete fields and individual
Search WWH ::




Custom Search