How to Change Directories in Command Prompt

A few typed entries away

What to Know

  • Type cmd into the Windows 10 search bar to open the command prompt.
  • Type cd then drag the folder or type the name of the folder into the command prompt.
  • Check your syntax is correct if it doesn't work.

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

How to Open the Command Prompt in Windows 10

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

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

    Windows 10 desktop with Search Bar highlighted
  2. Click cmd.

  3. 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 command prompt can be a lot simpler than you'd think. Here's one method of doing so.

  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 command prompt easily enough. Here's how to do so.

You'll need to know the name of the directory you're trying to browse to. 

  1. In the command prompt window, type cd followed by the name of the folder you wish to browse to.

    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.

  3. If you want to go back a 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 correct in your syntax usage. 
  • Check the directory exists. Check the directory you're trying to browse to actually exists otherwise your command won't work. Type dir to check the contents of the folder you're in. 
  • 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.
FAQ
  • What is Command Prompt?

    It's a command line interpreter program that's available in 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?

    Certain 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, simply run it as an administrator.

Was this page helpful?