Directories and Subdirectories
A file system is a method of organizing all of the files on an entire disk
or hard disk volume. Directories are used to divide the files on a disk
into logical groups that are easy to work with. Their purpose is similar
to the use of file drawers to contain groups of hanging folders, hanging
folders to contain smaller manila folders, and so on. Directories are
also sometimes referred to as folders.
Every drive has a root or base directory, and many have one or more
subdirectories. Subdirectories can also have subdirectories, extending in
a branching tree structure from the root directory. The collection of all
directories on a drive is often called the directory tree, and a portion
of the tree is sometimes called a subtree. The terms directory and
subdirectory are typically used interchangeably to mean a single
subdirectory within this tree structure.
Subdirectory names follow the same rules as file names (see File Names).
The drive and subdirectory portion of a file's name are collectively
called the file's path. For example, the file name
C:\DIR1\DIR2\MYFILE.DAT says to look for the file MYFILE.DAT in the
subdirectory DIR2 which is part of the subdirectory DIR1 which is on drive
C. The path for MYFILE.DAT is C:\DIR1\DIR2. The backslashes between
subdirectory names are required. On HPFS volumes the path and file name
must each be 255 characters or less in length, and in addition the total
length of the path and file name together cannot exceed 260 characters.
The operating system and command processor remember both a current or
default drive for your system as a whole, and a current or default
directory for every drive in your system. Whenever a program tries to
create or access a file without specifying the file's path, the operating
system uses the current drive (if no other drive is specified) and the
current directory (if no other directory path is specified).
The root directory is named using the drive letter and a single backslash.
For example, D:\ refers to the root directory of drive D:. Using a drive
letter with no directory name at all refers to the current directory on
the specified drive. For example, E:README.DOC refers to the file
README.DOC in the current directory on drive E:, whereas E:\README.DOC
refers to the file README.DOC in the root directory on drive E:.
There are also two special subdirectory names that are useful in many
situations: a single period by itself [.] means "the current default
directory." Two periods together [..] means "the directory which contains
the current default directory" (often referred to as the parent
directory). These special names can be used wherever a full directory
name can be used. CMD.EXE allows you to use additional periods to specify
directories further "up" the tree (see Extended Parent Directory Names).
Additional information about disk files and file systems is available
under Drives and Volumes, File Systems, File Names, and File Attributes
and Time Stamps.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs