Organization of Files in Directories and Subdirectories

Let us assume that you have three files. One contains details like names, ages and addresses of all the employees in a firm, another contains details of salaries of the employees, and a third contains the details of loans given to the employees. All these files relate to the employees of the firm. Therefore, it would be desirable to put all these files together, under a single unit.

To enable the user to arrange files within units and sub-units, DOS provides structures called directories on a disk. Directories have names, just as the floors of the library in the earlier example.

Let us assume that you wish to keep three kinds of files on a disk: LETTERS files, EXPENCES files and INCOME files. Within the EXPENCES files, you wish to further classify the files as PERSONAL and OFFICIAL EXPENSE files. DOS helps you to create a structure as shown in Figure.

In the structure in Figure, the Letters directory is a subdirectory of the root directory. PERSONAL is the subdirectory of EXPENSES. EXPENCES can also be called the parent directory of the PERSONAL directory.

All files relating to a particular subject can be kept together under a directory. The root directory in DOS is denoted by a backslash (\)

The directory structure resembles an inverted tree where the main directory is the root; hence it is called the root directory.

Root Directory and Subdirectories

Root Directory and Subdirectories