How to navigate folders in Windows Command Prompt

When you want to modify the properties of a specific file, scan a specific folder, or perform any other action in Command Prompt, you must first navigate to that folder.

When you want to modify the properties of a specific file, scan a specific folder, or perform any other action in Command Prompt, you must first navigate to that folder. Luckily, navigating through folders in Windows Command Prompt is simple when you have a few commands at hand.

Open Command Prompt with admin rights

First, open Command Prompt with admin rights. This step is very important; otherwise, Windows may not allow you to switch folders in some cases. To do this, type "Command Prompt" in Windows Search, right-click Command Prompt, and select Run as administrator. If prompted by the UAC window, click Yes.

How to navigate folders in Windows Command Prompt Picture 1How to navigate folders in Windows Command Prompt Picture 1

This action will launch a Command Prompt window with admin rights, giving you access to execute administrative tasks without restrictions. Be careful with admin rights, because you're more likely to cause problems if you make a mistake.

 Commands to navigate through folders in Command Prompt

To move back and forth between folders in Command Prompt, you need to be familiar with two main commands:

  1. Change directory: cd
  2. Directory listing: dir

The dir command will give you a list of available directories you can enter, while the cd command will take you to the directory you want. If you know the name of the folder you want to navigate to, type it after "cd" to move there (such as "cd downloads"). If you want to go back to the previous directory, 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 navigate. If you already know the directory 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:Windowssystem32) to the Downloads folder (C:UsersDownloads).

First you need to go back to drive C:. To do that, use the "cd." command twice to navigate out of the System32 and Windows folders, returning you to the root folder.

How to navigate folders in Windows Command Prompt Picture 2How to navigate folders in Windows Command Prompt Picture 2

Now, if you're not sure about the exact name of the first directory to navigate to, you can list the available directories to find the correct one - enter "dir" to display the list.

How to navigate folders in Windows Command Prompt Picture 3How to navigate folders in Windows Command Prompt Picture 3

 

Know 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 directories using the "cd" command like this:

cd cd Downloads

How to navigate folders in Windows Command Prompt Picture 4How to navigate folders in Windows Command Prompt Picture 4

Note that your system will not have the ehtas directory shown above; That username is unique to the example system. You will enter your username there.

2 commands for easy folder navigation in Command Prompt

In addition to the commands reviewed, a few additional commands will make navigating folders in the 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:WindowsSystem32AppLocker folder and want to go directly back to the main C: drive, enter this command and press Enter.

How to navigate folders in Windows Command Prompt Picture 5How to navigate folders in Windows Command Prompt Picture 5

2. Similarly, to convert drives from the root folder (or any other folder), enter the drive letter followed by a colon, such as "S:".

How to navigate folders in Windows Command Prompt Picture 6How to navigate folders in Windows Command Prompt Picture 6

How to open Command Prompt in a specific folder from File Explorer

Opening a 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" in the address bar and press Enter. This action will open Command Prompt in the current directory.

How to navigate folders in Windows Command Prompt Picture 7How to navigate folders in Windows Command Prompt Picture 7

 Navigating the Command Prompt may not be easy and it certainly takes some getting used to. But once you master the navigation commands, you'll be able to quickly browse folders on your computer with ease.

3.5 ★ | 2 Vote