When you want to change the attributes of a specific file, browse through a specific folder, or perform any other action in Command Prompt, you must first navigate to that folder. Fortunately, navigating through folders in Windows Command Prompt is very easy when you have a few commands available.
Open Command Prompt as administrator
First, open Command Prompt as an administrator. This is very important because otherwise, Windows may not allow you to change directories in certain cases. To do this, search for Command Prompt in Windows Search, then right-click it and select Run as administrator. If the UAC window appears, click Yes.

This will open the Command Prompt window with administrative privileges, allowing you to have the access required to perform management tasks without restrictions. However, be careful when using administrator privileges, as encountering errors could cause more serious issues.
Commands to navigate through folders in Command Prompt
To move back and forth between folders in Command Prompt, you need to get familiar with two main commands:
- Change directory: cd
- List directory: dir
The dir command will provide you with a list of available directories that you can enter, while the cd command will take you to the folder you want. If you know the name of the folder you want to navigate to, type that name after “cd” to move there (for example, “cd downloads”). If you want to go back to the previous folder, add two dots after the “cd” command. Like this: “cd..”
Tip: You only need to list directories when you are unsure where to navigate. If you already know the folder name, there is no need to use the “dir” command.
How to use “cd” and “dir” commands in Command Prompt
Let’s take a closer look at how you can navigate folders in Command Prompt using the “cd” and “dir” commands through an example.
Suppose you want to navigate from the starting point (C:\Windows\System32) to the Downloads folder (C:\Users\<username>\Downloads).
First, you need to go back to the C: drive. To do that, use the cd.. command twice to navigate out of the System32 and Windows folders, bringing you back to the root directory.

Now, if you are unsure of the exact name of the first folder you need 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 will be redirected to C:\Users. From there, you can continue to the next two folders using the “cd” command like this:
cd <username>cd Downloads

Note that your system will not have the ehtas folder displayed above; that username is unique to the example system. You will enter your own username there.
2 commands to easily navigate folders in Command Prompt
In addition to the commands already discussed, some additional commands will make navigating folders in Command Prompt easier:
1. You can use the “cd \” command to return to the root directory of the current drive. For example, if you are in the C:\Windows\System32\AppLocker folder and want to return directly to the main drive C:\, type this command and press Enter.

2. Similarly, to switch drives from the root directory (or any other directory), type the drive letter followed by a colon, such as “S:”.

How to open Command Prompt in a specific folder from File Explorer
Opening the CMD window from File Explorer eliminates the need to navigate back and forth between folders using various commands in Command Prompt.
Open File Explorer by clicking the folder icon on the taskbar. Navigate to the folder you want to access in Command Prompt. Type “cmd” into the address bar and press Enter. This action will open Command Prompt in the current folder.

Using Command Prompt may not be simple at first and will certainly take some time to get used to. However, once you have mastered the navigation commands, you will be able to quickly and easily browse through the folders on your computer.
