Quick Links
Open Command Prompt With Administrative Privileges
Commands to Navigate Across Directories in Command Prompt
How to Use the "cd" and "dir" Commands in Command Prompt
2 Commands for Easy Directory Navigation in Command Prompt
How to Open the Command Prompt in a Specific Directory From File Explorer
Key Takeaways
- Open the Command Prompt as administrator to avoid constraints. Type "Command Prompt" in Windows Search, right-click on Command Prompt, and select Run as Administrator.
- Use the "cd" command to change directories and the "dir" command to list available directories. Use "cd.." to back up from the directory you're currently in and "cd \" to go to the drive's root directory.
- To save time, you can also open Command Prompt in a specific directory from File Explorer by typing "cmd" into the address bar.
When you want to modify the attributes of a specific file, scan a particular folder, or perform any other action in Command Prompt, you have to navigate to that directory first. Fortunately, navigating through directories and folders in the Windows Command Prompt is simple once you have a few commands up your sleeve.
Open Command Prompt With Administrative Privileges
First, open the Command Prompt with administrative privileges. This step is crucial; otherwise, Windows might not allow you to switch directories in some instances. To do this, type "Command Prompt" in Windows Search, right-click on Command Prompt, and select Run as administrator. If prompted by the UAC window, click Yes.

This action will launch an elevated Command Prompt window, granting you access to execute administrative tasks without restriction. Be careful with admin permissions, as it's easier to cause a problem if you make a mistake.
Commands to Navigate Across Directories in Command Prompt
To move around folders in the Command Prompt, you need to be familiar with two main commands:
- Change directory: cd
- List directory: dir
The list directory command will give you a list of available directories you can enter, while the change directory command will take you to the directory you want. If you know the directory name you want to navigate to, enter it after "cd" to move there (like "cd downloads"). If you want to return to the previous directory, add two dots next to the "cd" command. Like this: "cd.."
You only need to list directories when you're unsure about where to navigate. If you already know the directory's name, using the "dir" command isn't necessary.
How to Use the "cd" and "dir" Commands in Command Prompt
Let's look more closely at how you can navigate directories in Command Prompt using the "cd" and "dir" commands with an example.
Assume you want to navigate from the starting point (C:\Windows\system32) to your Downloads folder (C:\Users\<username>\Downloads).
First, you need to return to the C: drive. To do that, use the command "cd.." twice to navigate out of the System32 and Windows folders, bringing you back to the root directory.

Now, if you're uncertain about the exact name of the first folder to navigate to, you can list the available directories to find the correct one—type "dir" to display the list.

Knowing that you need to go to the Users folder, type "cd Users" and you'll be directed to C:\Users. From there, you can proceed to the subsequent two folders using the "cd" command like this:
cd <username>
cd Downloads
Note that your system won't have the ehtas folder shown above; that username is unique to my system. You'll enter your username there.
2 Commands for Easy Directory Navigation in Command Prompt
Aside from the commands we've already looked at, a couple of extra commands will make navigating directories in Command Prompt easier:
- You can use the "cd \" command to return to the root directory of your current drive. For example, if you are in the folder C:\Windows\System32\AppLocker and wish to go back to the main drive C: directly, type this command and hit Enter.
- Likewise, to switch drives from the root (or any other) directory, enter the drive letter followed by a colon, such as "S:".
How to Open the Command Prompt in a Specific Directory From File Explorer
Opening a CMD window from the File Explorer eliminates the need to navigate back and forth across folders using different commands in the Command Prompt.
Open File Explorer by clicking on the folder icon in the taskbar. Navigate to the directory you want to access in Command Prompt. Type "cmd" in the address bar and press Enter. This action will open the Command Prompt in the current directory.

Navigating the Command Prompt can seem overwhelming, and it certainly takes some getting used to. But once you have a few navigational commands under your belt, you'll be able to whizz around your computer's directories with ease.