How to Change Directories in CMD (Command Prompt) (2025)

> Windows

Type cd and then write the full folder path. Don't forget quotes (in some cases)

By

Jennifer Allen

How to Change Directories in CMD (Command Prompt) (1)

Jennifer Allen

Writer

  • Swansea University, Staffordshire University

Jennifer Allen has been writing about technology since 2010. Her work has appeared in Mashable, TechRadar, and many more publications.

lifewire's editorial guidelines

Updated on May 30, 2024

Reviewed by

Jon Fisher

How to Change Directories in CMD (Command Prompt) (2)

  • Wichita Technical Institute

Jonathan Fisher is a CompTIA-certified technologist with more than 10 years of experience writing for publications like TechNorms and Help Desk Geek.

lifewire's editorial guidelines

In This Article

View All

In This Article

  • Step-by-Step: Drag and Drop the Folder
  • More Ways to Navigate Folders
  • Tips to Remember
  • Frequently Asked Questions

What to Know

  • Type cd followed by a space, then drag the folder or type the name of the folder into Command Prompt.
  • Depending on the circumstance, you'll need to surround the whole path in quotes.
  • Check that your syntax is correct if directory changes don't work.

This article explains several ways you can switch to a different directory while working in the Windows 11 or Windows 10 Command Prompt. It also teaches you what to do if these directions don't work.

How Do I Change Directories in Command Prompt?

It's a lot easier than you think. Here's one method that requires very little typing:

  1. Type cd and then press Space.

  2. Drag and drop the folder you want to browse into the window. For example, if we drag the Downloads folder, the prompt might say this:

     cdC:\Users\name\Downloads

    How to Change Directories in CMD (Command Prompt) (3)

  3. Press Enter to change the working directory to that folder.

How Do I Navigate to a Folder in Command Prompt?

If drag and drop isn't convenient or accessible (it doesn't work if you opened an elevated Command Prompt), or you'd prefer to type your commands, there are other ways to change the folder in Command Prompt. Here are a few examples:

21 Best Command Prompt Tricks
  1. Type cd followed by a space, then type the folder's name. In this example, the change directory command switches from the Users folder to the jonfi folder:

     cdjonfi

    How to Change Directories in CMD (Command Prompt) (4)

    This relative way of naming the folder only works for subfolders, i.e., directories straight after, or "under" the one you're in.

  2. Alternatively, use a backslash to drill through multiple folders at once. For example, if you're working from the C drive, typing this command will change the directory to Jake's Downloads folder:

     cdUsers\Jake\Downloads
  3. Type cd.. to go up/back one directory. If you're in the Desktop folder, for instance, entering this command will jump you back to the user's folder.

    How to Change Directories in CMD (Command Prompt) (5)

    If you feel lost within the directory, the dir command lists all the items contained in that folder.

  4. Type cd\ to jump all the way to the root of the hard drive. In most cases, this is the C drive.

  5. If the folder is somewhere totally different from where the current path is, you'll need to surround the whole path in quotes.

    For instance, assume you're working in the C:\Users folder. To get to this folder, which isn't part of the "Users" path, you'd type this:

     cd"C:\Othercomputers\MyPC\GDRIVENUC\ReceiptsBillsetc"
How to Open Command Prompt in a Folder

Why Can't I Change Directory in CMD?

If the working folder doesn't change in Command Prompt, you may be doing something wrong or have your permissions set incorrectly. Below are some things to be mindful of that should make it simple to change directories again.

  • Ensure you're 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. If the folder you're trying to move to doesn't exist, then 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 and you need to jump to a different one, type X: where X is the letter of the hard drive.
  • Confirm that you have admin rights. The cd command works in the standard and elevated Command Prompt, but other commands you're using with it might only run correctly if you're using Command Prompt as an administrator.

FAQ

  • 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 in some versions of Command Prompt. Open the program, 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?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

How to Change Directories in CMD (Command Prompt) (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Delena Feil

Last Updated:

Views: 6165

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.