How to Change Directories in Command Prompt: An Easy Guide (2024)

  • Categories
  • Computers and Electronics
  • Operating Systems
  • Windows
  • Command Prompt

Download Article

A comprehensive Guide to Changing Directories in the Windows Command Prompt

Written byTravis Boylls

Last Updated: August 29, 2024Fact Checked

Download Article

  • Opening Command Prompt
  • |
  • Changing the Directory
  • |
  • Other Directory Commands
  • |
  • Troubleshooting
  • |
  • |
  • Tips
  • |
  • Warnings

Do you want to know how to change directories in the Windows Command Prompt (CMD)? The Windows Command Prompt allows you to use a variety of advanced commands that give you more control over your computer. However, when learning to use the Command Prompt, you will need to learn some basic commands, including how to navigate by changing directories. A directory is just another name for a folder. This wikiHow teaches you how to change directories in the Windows Command Prompt. To make changes in Command Prompt, you must be using an administrator account.

Things You Should Know

  • Open the Command Prompt (CMD) and type "cd" with a space, followed by the name of the directory, or drag and drop the directory into CMD from File Explorer. Press "Enter."
  • Type "cd.." and press "Enter" to go back one directory. Type "cd\" and press "Enter" to go to the root of the drive. Type a drive letter (i.e. "D:") and press "Enter" to change drives.
  • Type "dir" and press "Enter" to view all directories in your current directory.

Section 1 of 4:

Opening Command Prompt

Download Article

  1. 1

    Open the Windows Start menu

    . To do so, click the icon with the Windows logo in the taskbar at the bottom of the screen. Alternatively, you can press the Windows key.

    • For Windows 8, place your mouse cursor in the top-right corner of the screen, then click the magnifying glass icon when it appears.
  2. 2

    Type in cmd. This will bring up the Command Prompt icon at the top of the Start window.

    Advertisem*nt

  3. 3

    Right-click Command Prompt

    . It resembles a black box with a white cursor. This displays a drop-down menu.

  4. 4

    Click Run as administrator. It's near the top of the drop-down menu. Doing so will open the Command Prompt with administrator privileges.

    • Confirm this choice by clicking Yes when prompted.
    • You won't be able to run Command Prompt in administrator mode if you are not signed into an Administrative account, or if you're on a restricted, public, or networked computer (e.g., a library or school computer).
  5. Advertisem*nt

Section 2 of 4:

Changing the Directory

Download Article

  1. 1

    Type in cd followed by a space. This command, which stands for "change directory", is the root of any directory change.

    • Don't press the "Enter" key just yet.
    • Alternatively, you can type chdir. This command does the exact same thing as "cd."[1]
  2. 2

    Determine your directory's path. A directory path is like a map to a specific folder. For example, if the directory to which you want to change is the "System32" folder that's, in the "Windows" folder on the hard drive, the path would be "C:\Windows\System32\."

    • You can find a folder by navigating to it in File Explorer. Click the address bar at the top to display the path to the folder you are currently in.
    • You can display a list of all directories in your current directory in the Command Prompt by typing dir and pressing "Enter."
  3. 3

    Type in your directory's path. Your command or address goes after the "cd" command; make sure there is a space between "cd" and your command.

    • For example, your whole command might look like cd Windows\System32.
    • Alternatively, you can drag and drop a folder from File Explorer into the Command Prompt.
    • If the directory is in the current drive you are in, you do not need to type the drive letter at the beginning of the path.
  4. 4

    Press Enter. Doing so will change the Command Prompt directory to your selected one. The current directory you are in is listed next to the text cursor (i.e. "C:\Windows\System32>".)

  5. Advertisem*nt

Section 3 of 4:

Other Directory Commands

Download Article

  1. 1

    Type cd.. and press Enter to go back a directory. If you want to go back one directory (i.e. change from "C:\Windows\System32" to "C:\Windows"), simply type "cd.." with two periods and press "Enter."

  2. 2

    Type cd\ and press Enter to return to the root of your drive. If you want to go back to the root of your drive (i.e. go from "C:\Windows\System32" to "C:\"), simply type "cd\" with a back slash and press "Enter."

  3. 3

    Type a drive letter and press Enter to change drives. If you try using the "cd" command to change directories to a directory that is on another drive, you will notice it does not work. You need to change drives before changing to a directory on that drive. To do so, type the drive letter (i.e. "D:") with a colon and press "Enter" to change drives.

    • Alternatively, you can type cd /d followed by the complete path (including the drive letter) of a directory on another drive to change directly to that drive (i.e. "cd /d D:\Documents".)
  4. 4

    Type dir and press Enter to list directories in your current directory. If you are not sure what directories are in your current directory, you can display a list of all the directories by typing "dir" and pressing "Enter."

  5. Advertisem*nt

Section 4 of 4:

Troubleshooting

Download Article

  1. 1

    Check that you are spelling the directory name correctly. If you receive an error message that says "The system cannot find the path specified," check to make sure you are spelling the name of the directory correctly. You can see a list of all directories in your current directory by typing dir and pressing "Enter."

  2. 2

    Check to make sure the directory exists. If you are spelling is correct and you are still getting the same error, open File Explorer and check to make sure the directory you are navigating to actually exists and that it's located where you think it's located.

    • If the directory does not exist, you can create a new directory by typing mkdir followed by a space, followed by the name of the directory you want to create. Then press "Enter."
  3. 3

    Make sure the directory is located on the drive that you are currently in. The "cd" command will not allow you to change to a directory on another drive. If you are currently in the "C:" drive, but the directory you want to change to is on the "D:" drive, you will need to change drive letters before changing to a new directly. You can do so by typing the drive letter and pressing "Enter."

  4. 4

    Make sure you are running the Command Prompt as an administrator. If you are not running the Command Prompt as an administrator, you will be limited in what you can do with the Command Prompt. Make sure you are logged into Windows as an Administrator, then right-click the CMD icon in the Start menu and click Run as Administrator.

  5. Advertisem*nt

Community Q&A

Search

Add New Question

  • Question

    How do I go to C:\ from C:\users\username?

    How to Change Directories in Command Prompt: An Easy Guide (25)

    Community Answer

    You can either type "cd .." to take you up a directory level (to C:\users) and once again to take you to the root level, or you can always type "cd \" from any directory to take you to the root level.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 20Helpful 38

  • Question

    How do I change the name of a drive, like from Drive H: to drive A:?

    How to Change Directories in Command Prompt: An Easy Guide (26)

    Community Answer

    In start, type Computer Management. Open Computer Management and click the arrow next to Storage, then Disk Management. Right-click the drive you want to rename and click Change Drive Letter.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 40Helpful 55

  • Question

    What is the difference between cd\ and cd?

    How to Change Directories in Command Prompt: An Easy Guide (27)

    Community Answer

    In order to use cd you have to put a file path after it; cd\ just goes straight to C:\.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 9Helpful 24

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Tips

      • Changing the directory is useful when attempting to modify or delete a file in a specific location.

        Thanks

        Helpful0Not Helpful0

      • You can see a complete list of Command Prompt commands by typing help and pressing "Enter."

        Thanks

        Helpful0Not Helpful0

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Name

      Please provide your name and last initial

      Submit

      Thanks for submitting a tip for review!

      Advertisem*nt

      Warnings

      • Attempting to run a command that is contingent on a specific file or folder while in a different directory will result in errors.

        Thanks

        Helpful1Not Helpful3

      Advertisem*nt

      You Might Also Like

      How toCreate a Custom Windows Command PromptHow toDelete a File Using Command Prompt
      How toChange the Computer Time and Date Using the Command PromptHow toCreate and Delete Files and Directories from Windows Command PromptHow to Format a USB Using CMD (Command Prompt)How to Change a Windows Password Using Command PromptHow toAdd Users from CMDHow to Open a Folder in Command Prompt (CMD)How toUse Windows Command Prompt to Run a Python FileHow toReboot from Command Prompt on WindowsHow to Run a Windows Batch File from the Command Line (CMD)How toCopy Files in Command PromptHow toUse Net SendHow to Run an EXE File at the Windows Command Prompt

      Advertisem*nt

      About This Article

      How to Change Directories in Command Prompt: An Easy Guide (43)

      Written by:

      Travis Boylls

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 2,825,309 times.

      How helpful is this?

      Co-authors: 28

      Updated: August 29, 2024

      Views:2,825,309

      Categories: Command Prompt

      In other languages

      Spanish

      Portuguese

      Russian

      German

      Chinese

      French

      Dutch

      Indonesian

      Korean

      Hindi

      Thai

      Arabic

      Turkish

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 2,825,309 times.

      Reader Success Stories

      • How to Change Directories in Command Prompt: An Easy Guide (44)

        Peshala Prabhapoorna

        Nov 18, 2016

        "This article has covered all the instances where we might go wrong or have a doubt. It was really useful to me as a..." more

      More reader storiesHide reader stories

      Is this article up to date?

      Advertisem*nt

      How to Change Directories in Command Prompt: An Easy Guide (2024)
      Top Articles
      What is the Value of UX Research?
      Tips for Helping an Elderly Relative Pay Bills | Elder Care Financial Services
      English Bulldog Puppies For Sale Under 1000 In Florida
      Katie Pavlich Bikini Photos
      Gamevault Agent
      Pieology Nutrition Calculator Mobile
      Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
      Hendersonville (Tennessee) – Travel guide at Wikivoyage
      Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
      Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
      Craigslist Dog Kennels For Sale
      Things To Do In Atlanta Tomorrow Night
      Non Sequitur
      Crossword Nexus Solver
      How To Cut Eelgrass Grounded
      Pac Man Deviantart
      Alexander Funeral Home Gallatin Obituaries
      Energy Healing Conference Utah
      Geometry Review Quiz 5 Answer Key
      Hobby Stores Near Me Now
      Icivics The Electoral Process Answer Key
      Allybearloves
      Bible Gateway passage: Revelation 3 - New Living Translation
      Yisd Home Access Center
      Home
      Shadbase Get Out Of Jail
      Gina Wilson Angle Addition Postulate
      Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
      Walmart Pharmacy Near Me Open
      Marquette Gas Prices
      A Christmas Horse - Alison Senxation
      Ou Football Brainiacs
      Access a Shared Resource | Computing for Arts + Sciences
      Vera Bradley Factory Outlet Sunbury Products
      Pixel Combat Unblocked
      Movies - EPIC Theatres
      Cvs Sport Physicals
      Mercedes W204 Belt Diagram
      Mia Malkova Bio, Net Worth, Age & More - Magzica
      'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
      Teenbeautyfitness
      Where Can I Cash A Huntington National Bank Check
      Topos De Bolos Engraçados
      Sand Castle Parents Guide
      Gregory (Five Nights at Freddy's)
      Grand Valley State University Library Hours
      Holzer Athena Portal
      Hello – Cornerstone Chapel
      Stoughton Commuter Rail Schedule
      Nfsd Web Portal
      Selly Medaline
      Latest Posts
      Article information

      Author: Kerri Lueilwitz

      Last Updated:

      Views: 6494

      Rating: 4.7 / 5 (67 voted)

      Reviews: 90% 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.