Whether you want to change the attributes of a specific file, browse a particular folder, or do anything else in Command Prompt, you first have to navigate to that folder. Fortunately, moving through folders in Windows Command Prompt is easy once you know the cd command in CMD and a few other basic commands.
Open Command Prompt as an administrator
The first step is to open Command Prompt with admin rights. This matters because otherwise Windows may not let you change directories in some cases. To do it, search for Command Prompt in Windows Search, then right-click it and choose Run as administrator. If a UAC window pops up, click Yes.

This opens a Command Prompt window with administrative privileges, giving you the access needed to carry out management tasks without restrictions. Be careful when using admin rights, though, because a mistake can cause more serious problems.
Commands for navigating 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 contents: dir
The dir command gives you a list of the folders available to enter, while the cd command in CMD takes you to the folder you want. If you know the name of the folder you want to go 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 next to the "cd" command, like this: "cd.."
Tip: You only need to list folders when you're not sure where to go. If you already know the folder name, there's no need to use the "dir" command.
How to use the cd command in CMD with the "dir" command
Let's take a closer look at how you can navigate folders by combining the cd command in CMD with the "dir" command, using an example.
Say you want to navigate from the starting point (C:\Windows\system32) to the Downloads folder (C:\Users\<username>\Downloads).
First, you need to get back to the C: drive. To do that, use the "cd.." command twice to move out of the System32 and Windows folders, which brings you back to the root directory.

Now, if you're not sure of the exact name of the first folder you need to go to, you can list the available folders to find the right one: type "dir" to display the list.

Once you know you need to go to the Users folder, type "cd Users" and you'll be taken to C:\Users. From there, you can continue to the next two folders with the cd command in CMD, like this:
cd <username>cd Downloads

Note that your system won't have the ehtas folder shown above; that username is unique to the example system. You'll type your own username there.
2 commands for easier folder navigation in Command Prompt
Besides the commands covered so far, a couple of additional ones make navigating folders in Command Prompt easier:
1. You can use the cd command in CMD with the syntax "cd \" to go back to the root folder of the current drive. For example, if you're in the C:\Windows\System32\AppLocker folder and want to return straight to the main C: drive, type this command and press Enter.

2. Similarly, the cd command in CMD isn't enough to switch drives; from the root folder (or any other folder), type the drive letter followed by a colon, such as "S:".

How to open Command Prompt in a specific folder from File Explorer
Opening a CMD window from File Explorer removes the need to hop between folders with a series of 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" in the address bar and press Enter. This opens Command Prompt in the current folder.

Using Command Prompt may not be simple at first, and it will certainly take a little time to get used to. Once you've mastered the cd command in CMD and the other navigation commands, though, you'll be able to move through the folders on your computer quickly and easily.
