The files in the computer come from various sources. Some files come with DOS, while other comes with publications such as a word processor. These files contain codes and other information that is necessary to make the computer application operational. Before long, there will be hundreds or even thousands of files in the computer, which can make it difficult to locate specific files.
The names of all the files created in a disk are stored in its directory. Directory is just like a file folder, which contain all the logically related files. The DOS files are organized in a hierarchical or an inverted tree like structure. The general analogy is with a file cabinet containing a number of drawers, which in turn may contain folders. The content of these folders is the needed information.
The file cabinet here is the ROOT DIRECTORY, the drawer is INDIVIDUAL DIRECTORY, the folders are SUBDIRECTORY and the information in these folders may in turn be classified as FILES.
Otherwise, the large number of files that get created for various purposes in a disk can make the directory huge and difficult to view and manage. Therefore, DOS enables the user to organize the files in a disk into directories and sub directories in a hierarchical structure. Directories can contain other directories. A directory within another directory is called a sub directory. Of course, there may be sub directories of sub directories, but a file name is the furthest you may descend down the (inverted) tree of directories and files. Thus, a file name corresponds to a tree leaf, a subdirectory to a branch, the directory to the trunk, and the root directory to the root of the tree, hence the name ROOT DIRECTORY.
Directory Structure of DOS