Subdirectory

Updated: 04/30/2020 by Computer Hope
Subdirectories

In a computer file system, a subdirectory is a directory that is contained another directory, called a parent directory. A parent directory may have multiple subdirectories.

In operating systems with a GUI such as Microsoft Windows, a directory is called a folder, and a subdirectory is called a subfolder.

Subdirectory

Every directory except for the top-level root directory is a subdirectory of at least one directory. The list of parent directories of a directory or file is called its path.

In Windows

The following is an example of a file's path, including its parent directories, in Microsoft Windows.

Windows command line path

In Linux

In the following example path in a Linux operating system, public_html is a subdirectory of computerhope, which is a subdirectory of c, etc. The special root folder / is the only directory that is not a subdirectory, because it has no parent directory.

/home/users/c/computerhope/public_html/

Subfolder

Like a subdirectory, a subfolder is any folder that is a child of another folder. In the example below, Fonts and System32 are subfolders of the Windows folder.

-Windows Folder Windows
+--System32 Folder System32
+--Fonts Folder Fonts

Operating system terms, Parent, Recurse subdirectories