Download Article
A comprehensive Guide to Changing Directories in the Windows Command Prompt
Download Article
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.
Steps
Section 1 of 4:
Opening Command Prompt
-
Type in cmd . This will bring up the Command Prompt icon at the top of the Start window.Advertisement
-
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).
Advertisement
Section 2 of 4:
Changing the Directory
-
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] X Research source
-
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 ."
-
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.
-
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>".)
Advertisement
Community Q&A
Search
-
QuestionHow do I go to C:\ from C:\users\username?Community AnswerYou 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.
-
QuestionHow do I change the name of a drive, like from Drive H: to drive A:?Community AnswerIn 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.
-
QuestionWhat is the difference between cd\ and cd?Community AnswerIn order to use cd you have to put a file path after it; cd\ just goes straight to C:\.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
- Changing the directory is useful when attempting to modify or delete a file in a specific location.Thanks
-
Thanks
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
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
Advertisement
About This Article
Thanks to all authors for creating a page that has been read 2,922,540 times.
Reader Success Stories
- "This article has covered all the instances where we might go wrong or have a doubt. It was really useful to me as a beginner." ..." more
Advertisement