How To Change Directories In Command Prompt: 8 Steps - WikiHow

Skip to ContentQuizzes
  • Home
  • Random
  • Browse Articles
  • Quizzes & Games
  • All QuizzesHot
  • Love Quizzes
  • Personality Quizzes
  • Fun Games
  • Dating Simulator
  • Learn Something New
  • Forums
  • Courses
  • Happiness Hub
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
Terms of Use wikiHow is where trusted research and expert knowledge come together. Learn why people trust wikiHow How to Navigate to a Different Folder in the Command Prompt PDF download Download Article A comprehensive Guide to Changing Directories in the Windows Command Prompt Written by Travis Boylls

Last Updated: October 18, 2025 Fact Checked

PDF download Download Article
  • Opening Command Prompt
  • |
  • Changing the Directory
  • |
  • Other Directory Commands
  • |
  • Troubleshooting
  • |
  • Q&A
  • |
  • Tips
  • |
  • Warnings
|Show more |Show less X

This article was co-authored by wikiHow staff writer, Travis Boylls. Travis has been a tech writer at wikiHow for more than 10 years. He has also worked in technical support for Dish Network and AT&T Wireless. He studied graphic design and web design at Pikes Peak Community College. He specializes in Windows, macOS, Linux, Android, iOS, and video game consoles. Travis has had a fascination with computers and technology that goes all the way back to childhood. He is proficient in all manner of software and computer operating systems. This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources. This article has been viewed 2,996,102 times. Learn more...

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.

How to Change Directory in CMD: Quick Steps

In Command Prompt (CMD), type "cd" with a space after it, followed by the name of the directory (or drag and drop the directory into CMD from File Explorer). Then press "Enter."

Steps

Section 1 of 4:

Opening Command Prompt

PDF download Download Article
  1. Step 1 Open the Windows Start menu icon. 1 Open the Windows Start menu Windows Start. 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. Step 2 Type in cmd. 2 Type in cmd. This will bring up the Command Prompt icon at the top of the Start window. Advertisement
  3. Step 3 Right-click Command Prompt icon. 3 Right-click Command Prompt Windows cmd. It resembles a black box with a white cursor. This displays a drop-down menu.[1]
  4. Step 4 Click Run as administrator. 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.[2]
    • 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. Advertisement
Section 2 of 4:

Changing the Directory

PDF download Download Article
  1. Step 1 Type in cd  followed by a space. 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."[3]
  2. Step 2 Determine your directory's path. 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. Step 3 Type in your directory's path. 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. Step 4 Press ↵ Enter. 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. Advertisement
Section 3 of 4:

Other Directory Commands

PDF download Download Article
  1. Step 1 Type cd.. 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."[4]
  2. Step 2 Type cd\ and press ↵ Enter to return to the root of your drive. 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."[5]
  3. Step 3 Type a drive letter and press ↵ Enter to change drives. 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. Step 4 Type dir and press ↵ Enter to list directories in your current directory. 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. Advertisement
Section 4 of 4:

Troubleshooting

PDF download Download Article
  1. Step 1 Check that you are spelling the directory name correctly. 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. Step 2 Check to make sure the directory exists. 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. Step 3 Make sure the directory is located on the drive that you are currently in. 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. Step 4 Make sure you are running the Command Prompt as an administrator. 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. Advertisement

Community Q&A

Search Add New Question
  • Question How do I go to C:\ from C:\users\username? Community Answer 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 Yes No Not Helpful 21 Helpful 39
  • Question How do I change the name of a drive, like from Drive H: to drive A:? Community Answer 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 Yes No Not Helpful 40 Helpful 55
  • Question What is the difference between cd\ and cd? Community Answer 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 Yes No Not Helpful 10 Helpful 24
See more answers 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 Helpful 0 Not Helpful 0
  • You can see a complete list of Command Prompt commands by typing help and pressing "Enter." Thanks Helpful 0 Not Helpful 0
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! 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 Helpful 1 Not Helpful 3
Advertisement

You Might Also Like

Open a Folder in CmdHow to Open a Folder in Command Prompt (CMD) Use MS DOSHow to Use MS DOS Find All Commands of CMD in Your ComputerHow to Display and Use CMD Commands: A List and Guide Go Back Using the Command PromptHow toGo Back Using the Command Prompt Use the Command Terminal in Windows 10 to Move and Copy Files/FoldersHow to Use the Windows 10 CLI to Move & Copy Files or Folders Copy Files in Command PromptHow toCopy Files in Command Prompt Navigate the Windows DirectoryHow toNavigate the Windows Directory Run a Batch File from the Command Line on WindowsHow to Execute a Batch File from the Command Line (CMD) Run a Program on Command PromptHow to Run a Program at the Windows Command Prompt: 2 Ways Open the Command Prompt in Windows6 Simple Ways to Open the Command Line in Windows Create and Delete Files and Directories from Windows Command PromptHow toCreate and Delete Files and Directories from Windows Command Prompt Run Command Prompt As an Administrator on Windows4 Ways to Run the Command Prompt as an Administrator in Windows Create a Folder on a PC3 Easy Ways to Create a New Folder on a Windows PC Run an EXE File From Command PromptRun an EXE File From the Command Prompt on Windows 10 & 11 Advertisement

References

  1. https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
  2. https://grok.lsu.edu/article.aspx?articleid=18026&printable=y
  3. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cd
  4. https://www.ibm.com/docs/en/aix/7.2.0?topic=directories-changing-another-directory-cd-command
  5. https://www.ibm.com/docs/en/aix/7.2.0?topic=directories-changing-another-directory-cd-command

About This Article

Travis Boylls Written by: Travis Boylls wikiHow Technology Writer This article was co-authored by wikiHow staff writer, Travis Boylls. Travis has been a tech writer at wikiHow for more than 10 years. He has also worked in technical support for Dish Network and AT&T Wireless. He studied graphic design and web design at Pikes Peak Community College. He specializes in Windows, macOS, Linux, Android, iOS, and video game consoles. Travis has had a fascination with computers and technology that goes all the way back to childhood. He is proficient in all manner of software and computer operating systems. This article has been viewed 2,996,102 times. How helpful is this? Co-authors: 28 Updated: October 18, 2025 Views: 2,996,102 Categories: Command Prompt In other languages Spanish Portuguese Italian Russian German Chinese French Dutch Indonesian Czech Korean Hindi Vietnamese Thai Arabic Turkish Persian Japanese
  • Print
  • Send fan mail to authors
Thanks to all authors for creating a page that has been read 2,996,102 times.

Reader Success Stories

  • Peshala Prabhapoorna

    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 stories Hide reader stories Share your story

Is this article up to date?

Yes No Advertisement Cookies make wikiHow better. By continuing to use our site, you agree to our cookie policy. Travis Boylls Written by: Travis Boylls wikiHow Technology Writer Click a star to vote Co-authors: 28 Updated: October 18, 2025 Views: 2,996,102 Peshala Prabhapoorna

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 Anonymous

Anonymous

Jan 9, 2017

"Very helpful. Good to know that in these times, when CMD is almost extinct, writers like you write such articles." Tatevik M.

Tatevik M.

Apr 3, 2017

"It really was helpful! Thank you so much! " Rated this article: Pradip Chaughule

Pradip Chaughule

Mar 20, 2016

"Very good article. Helped me a lot." Shikha Shah

Shikha Shah

Aug 3, 2016

"This article was very useful." Share yours! More success stories Hide success stories

Quizzes & Games

Music Notes & Symbols TestMusic Notes & Symbols TestTake QuizGrammar TestGrammar TestTake QuizDiscord Username Idea GeneratorDiscord Username Idea GeneratorGenerate NamesWhat Tarot Card Am I QuizWhat Tarot Card Am I QuizTake QuizGreek Alphabet QuizGreek Alphabet QuizTake QuizCreative Ability TestCreative Ability TestTake Quiz

You Might Also Like

Open a Folder in CmdHow to Open a Folder in Command Prompt (CMD)Use MS DOSHow to Use MS DOSFind All Commands of CMD in Your ComputerHow to Display and Use CMD Commands: A List and GuideGo Back Using the Command PromptHow toGo Back Using the Command Prompt

Featured Articles

21 Common Hand Signs & Gestures (& What They Mean)21 Common Hand Signs & Gestures (& What They Mean)170+ Best Useless Facts That Sound Like Lies170+ Best Useless Facts That Sound Like LiesIs He Interested In Me QuizIs He Interested In Me Quiz15 Signs Your Ex Misses You (and What to Do About It)15 Signs Your Ex Misses You (and What to Do About It) Observe Hanukkah (From Candle Lighting to Latke Frying)How to Observe Hanukkah (From Candle Lighting to Latke Frying)165+ "You Are Special" Quotes For Friends, Family, Partners & More165+ "You Are Special" Quotes For Friends, Family, Partners & More

Trending Articles

Let Us Rate You 1-10: Attractiveness Scale QuizLet Us Rate You 1-10: Attractiveness Scale QuizHow Much Do I Mog QuizHow Much Do I Mog QuizAm I Annoying QuizAm I Annoying QuizHave I Met My Soulmate Yet QuizHave I Met My Soulmate Yet QuizHow Nonchalant Am I QuizHow Nonchalant Am I QuizHow Weird Am I QuizHow Weird Am I Quiz

Featured Articles

115+ Brain Teasers For Adults & Kids (With Answers!)115+ Brain Teasers For Adults & Kids (With Answers!)When Will I Get My First Kiss QuizWhen Will I Get My First Kiss Quiz17 Believable Excuses to Miss Class At the Last Minute17 Believable Excuses to Miss Class At the Last Minute Speed Up Your Slow-Performing Mobile DataHow to Speed Up Your Slow-Performing Mobile Data Get a Nice BodyHow to Get a Nice BodyIce Cream Personality TestIce Cream Personality Test

Featured Articles

Dress for WinterHow toDress for WinterNicknames for Your Girlfriend: 125+ Funny, Sweet & Clever IdeasNicknames for Your Girlfriend: 125+ Funny, Sweet & Clever Ideas Give Someone a Great GiftHow to Give Someone a Great GiftWhat Would My Life At Camp Half-Blood Be Like QuizWhat Would My Life At Camp Half-Blood Be Like QuizThe Best Hairstyles for Guys with Big ForeheadsThe Best Hairstyles for Guys with Big Foreheads22 Best Ideas for Scary (and Funny) Pranks22 Best Ideas for Scary (and Funny) Pranks

Watch Articles

Wrap a Round GiftHow toWrap a Round GiftSteam in an OvenHow toSteam in an Oven Make Plant-Based Meat: 4 Incredible RecipesHow to Make Plant-Based Meat: 4 Incredible RecipesClean a Silver NecklaceHow toClean a Silver Necklace4 Easy Ways to Open a Can of Soda4 Easy Ways to Open a Can of SodaPart Your HairHow toPart Your Hair

Trending Articles

Can We Guess If You're Single or Taken?Can We Guess If You're Single or Taken?How Would My Fandom See Me If I Were a Fictional Character QuizHow Would My Fandom See Me If I Were a Fictional Character QuizWho's My KPop Lookalike QuizWho's My KPop Lookalike QuizAm I a Furry QuizAm I a Furry QuizMake OutHow toMake OutThe World's Hardest Riddles (for Kids & Adults)The World's Hardest Riddles (for Kids & Adults)

Quizzes & Games

IQ TestIQ TestTake QuizWhat Should I Do QuizWhat Should I Do QuizTake QuizCognitive TestCognitive TestTake QuizImpossible English TestImpossible English TestTake QuizAm I Smarter Than a High Schooler QuizAm I Smarter Than a High Schooler QuizTake QuizWhat Decade Do I Actually Belong In QuizWhat Decade Do I Actually Belong In QuizTake Quiz wikiHow
  • Categories
  • Computers and Electronics
  • Operating Systems
  • Windows
  • Command Prompt
wikiHow Newsletter You're all set! Helpful how-tos delivered toyour inbox every week! Sign me up! By signing up you are agreeing to receive emails according to our privacy policy.
  • Home
  • About wikiHow
  • Experts
  • Jobs
  • Contact Us
  • Site Map
  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info
  • Contribute

Follow Us

×

wikiHow Tech Help Pro:

Level up your tech skills and stay ahead of the curve

Let's go! X --562

Từ khóa » Cd Trong Cmd