This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher.
The wikiHow Tech Team also followed the article's instructions and verified that they work.
This article has been viewed 2,442,345 times.
Learn more...
This wikiHow teaches you how to change the folder (also known as the "directory") in which your Windows computer's Command Prompt program operates. To make changes in Command Prompt, you must be using an administrator account.
Things You Should Know
- Open start and type cmd. Right click Command Prompt and click Run as administrator.
- Type cd and enter your directory's path. The path can be found by looking at the address at the top of the folder you are directing to.
- Press ↵ Enter.
Steps
Opening Command Prompt
-
1Open Start. Either click the Windows logo in the bottom-left corner of the screen, or press the ⊞ Win 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.
-
2Type in cmd. This will bring up the Command Prompt icon at the top of the Start window.Advertisement
-
3Right-click Command Prompt. It resembles a black box. This invokes a drop-down menu.
-
4Click Run as administrator. It's near the top of the drop-down menu. Doing so will open 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're on a restricted, public, or networked computer (e.g., a library or school computer), or an otherwise non-administrator account.
Changing the Directory
-
1Type in cd . Make sure you include the space after "cd". This command, which stands for "change directory", is the root of any directory change.
- Don't press the ↵ Enter key.
-
2Determine 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's path by opening My Computer, double-clicking the hard drive icon, navigating to your destination, and then looking at the address at the top of the folder.
-
3Type 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 or cd D:.
- Since your computer's default directory location will be the hard drive (e.g., "C:"), you don't need to type in the hard drive's name.
-
4Press ↵ Enter. Doing so will change the Command Prompt directory to your selected one.
Community Q&A
-
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:\.
Warnings
- Attempting to run a command that is contingent on a specific file or folder while in a different directory will result in errors.⧼thumbs_response⧽
About This Article
1. Open Command Prompt.
2. Type in cd followed by a space.
3. Type in your preferred directory command or path.
4. Press ↵ Enter.