The root directory contains all other folders in the drive or folder, and can, of course, also contain files. You can visualize this with an upside-down tree where the roots (the root folder) are at the top and the branches (subfolders) fall below; the root is what holds together all of its lower items. For example, the root directory of the main partition on your computer is probably C:. The root folder of your DVD or CD drive might be D:. The root of the Windows Registry is where hives like HKEY_CLASSES_ROOT are stored.
Examples of Root Folders
The term root may also be relative to whatever location you’re talking about. For example, a program that installs to C:\Programs\Example uses that particular folder as its root, with potentially a series of subfolders beneath it. This same thing applies to any other folder. Do you need to go to the root of the user folder for User1 in Windows? That’s the C:\Users\Name1\ folder. This, of course, changes depending on what user you’re talking about—the root folder of User2 would be C:\Users\User2.
Accessing a Root Folder
A quick way to get to the root folder of the hard drive when you’re in a Windows Command Prompt is to execute the change directory—cd—command like this: After executing, you’ll immediately be moved from the current working directory all the way up to the root folder. So, for example, if you’re in the C:\Windows\System32 folder and then enter the cd command with the backslash (as shown above), you’ll immediately be moved from where you’re at to C:. Similarly, executing the cd command like this: …will move the directory up one position, which is helpful if you need to get to the root of a folder but not the root of the entire drive. For example, executing cd .. while in the C:\Users\User1\Downloads\ folder changes the current directory to C:\Users\User1. Doing it again takes you to C:\Users, and so on. Below is an example where we start in a folder called Germany on the C:\ drive. As you can see, executing that same command in Command Prompt moves the working directory to the folder just before/above it, all the way to the root of the hard drive.
More About Root Folders & Directories
The term web root folder may sometimes be used to describe the directory that holds all of the files that make up a website. The same concept applies here as on your local computer—the files and folders in this root folder contain the main web page files, such as HTML files, that should be displayed when someone accesses the main URL of the website. The term root used here shouldn’t be confused with the /root folder found on some Unix operating systems, where it’s instead of the home directory of a specific user account (which is sometimes called the root account). In a sense, though, since it’s the main folder for that specific user, you could refer to it as the root folder. In some operating systems, files can be stored in the root directory, like the C:/ drive in Windows, but some OSs don’t support that. The term root directory is used in the VMS operating system to define where all the user’s files are stored.