How to Change Directories in CMD (Command Prompt)

Type cmd into the Windows search bar to get started

What to Know

  • Type cmd into the Windows 11 or Windows 10 search bar to open the command prompt.
  • Type cd followed by a space, and then drag the folder or type the name of the folder into the command prompt.
  • Check that your syntax is correct if directory changes don't work.

This article teaches you two different methods to change directories in the command prompt in Windows 11 and Windows 10. It also teaches you what to do if you're unable to change directories. 

How to Open the Command Prompt in Windows 11 and 10

Before you can navigate around the command prompt in Windows 11 and 10, it's useful to know how to open the command prompt. Here's how to do so.

  1. On the Windows 11 or 10 search bar, type cmd.

    Windows 10 desktop with Search Bar highlighted
  2. Select Open or click Run as Administrator to open the command prompt with full access rights to do whatever you need to do.

    Windows 10 desktop with Run as Administrator highlighted

How Do I Change Directories in Command Prompt?

Changing directories in the command prompt can be a lot simpler than you'd think. Here's one method of doing so. This method works in both Windows 11 and Windows 10.

  1. Type cd followed by a space in the command prompt window.

    Windows 10 command line prompt with cd typed in
  2. Drag and drop the folder you want to browse into the window.

    Windows 10 command prompt with a folder nearby to drag
  3. Press Enter.

How Do I Navigate to a Folder in Command Prompt?

If drag and drop isn't convenient or accessible, or you'd prefer to type your commands, there's another way of navigating to a folder in the command prompt easily enough. Here's how to do so in Windows 11 and 10.

You'll need to know the name of the directory. 

  1. In the command prompt window, type cd followed by the folder's name you wish to find.

    Windows 10 desktop with command line prompt open

    This only works for immediate folders straight after the one you're in.

  2. Alternatively, type cd name\name to go down two levels of documents at once. For example: cd Admin\Downloads

  3. If you want to go back one directory, type cd .. to go up a level before typing cd to go back to the original option. 

    Windows 10 command line prompt

    If you feel lost within the directory, type dir and press enter to view the contents of the directory you're in.

Why Can't I Change Directory in CMD? 

If you can't change directories within the command prompt, you may be doing something wrong or have your permissions set incorrectly. Here are some things to bear in mind that should make it simple to change directories again. 

  • Check you are typing the correct command. Make sure to start your command by typing cd. You may have mistyped something or typed too many characters. Be sure you're accurate in your syntax usage. 
  • Check the directory exists. Check the directory you're trying to browse to exists; otherwise, your command won't work. Type dir to check the contents of a folder. 
  • Check you're browsing the correct hard drive. If you have multiple hard drives installed, check you're browsing the correct one. Change hard drives by typing X: where X is the letter of the hard drive. 
  • Check you have admin permissions. Check you're running the command prompt as an Administrator; otherwise, you may be limited with what you can do.
  • What is Command Prompt?

    It's a command-line interpreter program that's available on all Windows PCs. It's often used to perform more advanced administrative functions or to troubleshoot an issue. The commands you can use depend on which version of Windows you own.

  • How do you clear Command Prompt?

    Type cls and press Enter. This clears all of the previous commands you entered.

  • Can I use copy/paste in Command Prompt?

    Yes, but you need to enable it first. Open Command Prompt, right-click on the top bar, and select Properties. Under Edit Options, select the checkbox next to Use Ctrl+Shift+C/V as Copy/Paste.

  • What is an elevated command prompt?

    Specific commands require an elevated Command Prompt to run. You'll know you need this if you get an error message about having insufficient privileges or needing administrator-level access. To elevate Command Prompt, run it as an administrator.

Was this page helpful?