How to Navigate Directories and Folders in the Windows Command Prompt (2025)

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.

How to Navigate Directories and Folders in the Windows Command Prompt (1)

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.

How to Navigate Directories and Folders in the Windows Command Prompt (2)

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.

How to Navigate Directories and Folders in the Windows Command Prompt (3)

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

How to Navigate Directories and Folders in the Windows Command Prompt (4)

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:

  1. 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.
    How to Navigate Directories and Folders in the Windows Command Prompt (5)
  2. Likewise, to switch drives from the root (or any other) directory, enter the drive letter followed by a colon, such as "S:".
    How to Navigate Directories and Folders in the Windows Command Prompt (6)

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.

How to Navigate Directories and Folders in the Windows Command Prompt (7)

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.

How to Navigate Directories and Folders in the Windows Command Prompt (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6169

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.