Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

This guide covers 5 options to change the directory in Command Prompt.

Option 1: Change to Root Directory

To change directory in Command Prompt to the root directory, enter the command below and press enter.

cd\

In this example, my Command Prompt is in the path “C:\Users\Victo”. To change to the root of C:. I will enter cd\ command and press enter on my keyboard. See the second image below – the directory is now in the root of C.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
How to Change Directory in Command Prompt - Change to Root Directory
How to Change Directory in Command Prompt - Change to Root Directory

Option 2: Change Directory One Step from the Current Directory

You can also change directory, one directory behind the current directory. To do this, enter this command and press enter.

#1 Best Overall
Sale
Logitech MK270 Full Size Wireless Keyboard and Mouse Combo - Black
  • Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
  • Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
  • Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
  • Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
  • Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
cd..

or

cd ..
The first command has no space between “cd” and the 2 periods “..”. Then second command does not. They both accomplish the same result.

Here is an example. My current Command Prompt is on “C:\Users\Victo”. However, I want to change it to “C:\Users” – here are the screenshots…

Option 3: Change Directory to Another Drive

If you are currently in a drive and want to change to another drive, enter the drive name, followed by a colon and the /d switch. Then, press enter. For example to change from drive C to E, enter the command below and press enter.

e: /d
e is the drive. It is NOT case-sensitive – can be lower or upper case. If you do not include the /d switch, command prompt will return to the current drive. To display the new drive, enter the drive letter, followed by a colon.

Option 4: Change Directory to a Full Path

You can also change directory in Command Prompt to a specified path. In this section, I will show you how to cd to a path on the same drive and on a different drive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech MK345 Full Size Wireless Keyboard and Mouse Combo - Black
  • Dependable wireless connection: Enjoy the reliability and convenience of 2.4 GHz connectivity with your logitech wireless keyboard and mouse combo, wireless range up to 10 meters away at home, or work.
  • Full-Size Wireless Keyboard: Comfortable, quiet typing on a familiar keyboard layout with palm rest, spill-resistant design, and media keys. This wireless keyboard and mouse logitech has easy-access to media keys
  • Plug and Play: MK345 works seamlessly with Windows, macOS, and ChromeOS. Experience hassle-free setup with the logitech mk345 wireless combo and wireless keyboard mouse combo for various operating systems.
  • Long-lasting Battery: The MK345 combo offers a full size keyboard battery life of up to 3 years and a mouse battery life of 18 months (1); batteries included
  • Comfortable Right-handed Mouse: This wireless USB mouse with dongle works well for this wireless mouse and keyboard combo, featuring a contoured shape for all-day comfort and smooth, precise tracking and scrolling for easier navigation.

To change to a path on the same drive, enter cd followed by the full path you want to cd to – better to enclose the path in a double-quote (“”). In this example, I want to change to “C:\ESD”, I will enter this command and press enter…

cd "C:\ESD"

Command Prompt will change to the specified directory…

However, to change to a directory in a different drive, enter cd, followed by the full path. Then, run a second command – the new directory drive letter, followed by colon (:).

Rank #3
Sale
Wireless Keyboard and Mouse Combo, Full Size Silent Ergonomic Keyboard and Mouse, Long Battery Life, Optical Mouse, 2.4G Lag-Free Cordless Mice Keyboard for Computer, Mac, Laptop, PC, Windows
  • 【Ergonomic Wireless Keyboard Mouse 】: Wireless ergonomic keyboard is equipped with adjustable height tilt legs to increase comfort and prevent your wrists injury when typing for a long time. The full size wireless keyboard with numeric keypad and 12 multimedia shortcut keys, such as play/ pause, volume increase and decrease, and email, to help you improve work efficiency
  • 【Stable & Reliable Wireless Connection】: This wireless keyboard and mouse combo share the same USB receiver(stored in the mouse), and they can also be used separately. Plug & play, no need to download any software, 2.4 GHz wireless provides a powerful and reliable connection up to 33 feet(10m) without any delays.You can enjoy the convenience and freedom of wireless connection at home or at work
  • 【Comfortable Optical Mouse】: This compact lightweight wireless mouse features a hand-friendly contoured shape for all-day comfort, and smooth, precise tracking.1600 DPI to meet your daily needs. Perfect for home & office work and entertainment
  • 【Long Battery Life】: Up to 365 Days of battery life for keyboard and mouse wireless, say goodbye to the hassle of charging cables and replacing batteries. After 10 minutes of inactivity, the wireless keyboard mouse combo will automatically go into sleep mode to save energy. The wireless keyboard requires one AAA battery, and the wireless mouse requires one AA battery.
  • 【Less Noise, More Quiet Keys】: Soft membrane keys provide a quiet and comfortable typing experience, So you can type with confidence on a wireless keyboard crafted for comfort, precision and fluidity. The wireless mouse adopts silent micro-motion technology, which is almost completely silent when clicked. No more concerns about disturbing others.

In the next example, I want to change from “C:\ESD” (current directory) to “E:\Archives” – a directory in another drive. I will use the following commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd "E:\Archives"
e:

Here is the result of the commands in CMD…

Option 5: Change to a Directory in the Current Directory

There is a final option to change directory in Command Prompt – you can change to a directory in the current directory. To demonstrate this, I will first list all directories in the current directory with the dir command.

In this example, my CMD is in the path, “C:\G-Drive-P”. To list all directories in “G-Drive-P”, I will enter the command below and press enter.

Rank #4
Logitech MK540 Full Size Advanced Wireless Keyboard and Mouse Combo
  • Precision Typing: An instantly familiar experience, type with ease and comfort on this full-size wireless keyboard, featuring reduced noise, palm rest, spill-resistant design (1), adjustable tilt legs
  • Built For Comfort: The sleek combo's wireless mouse features an ambidextrous shape and soft rubber side grips that fit comfortably in your palm, as well as enhanced tracking and precise cursor control
  • Long-Lasting Autonomy: The wireless keyboard and mouse set come with long-lasting battery life, with the keyboard lasting up to 36 months and the wireless mouse for up to 18 months (3)
  • Customized Control: Enhanced productivity at your fingertips, the computer keyboard comes built with convenient, essential hotkeys providing direct access to media, calculator, battery check functions
  • Wireless Freedom: Plug-and-play your keyboard and mouse with the mini Logitech Unifying USB receiver, for a reliable wireless connection up to 33 ft away from your PC or laptop (2)
dir

The “G-Drive-P” has 3 directories – “Reports”, “Operations Tools” and “Work Tools”.

To change to “Work Tools” directory, I will use the command below…

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd "Work Tools"

Command Prompt will change to the new directory.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Conclusion

You can use the options in this Itechguide to Change Directory in Command Prompt!

Best Value
Sale
Logitech MK200 Full Size Wired Keyboard and Mouse Combo with Media Keys
  • The things you do most are right at your fingertips with one-touch controls for instant access to play/pause, volume, mute and the Internet.
  • Comfortable low-profile keys: Enjoy fast, fluid quiet typing on a familiar standard layout, including number pad.
  • High-definition optical mouse: Smooth, responsive cursor control from a comfortable sculpted mouse.
  • Sleek and durable design: Thin profile, spill-resistant design, durable keys and sturdy adjustable tilt legs. Tested under limited conditions (maximum of 60 ml liquid spillage). Do not immerse keyboard in liquid.
  • Plug-and-play PC compatibility: Simple USB connection. Works with Windows XP, Windows Vista, Windows 7, Windows 8 or later or Linux kernel 2.6 or later.

I hope you found this Itechguide helpful. If you found it helpful, click on “Yes” beside the “Was this page helpful” question below.

You may also express your thoughts and opinions by using the “Leave a Comment” form at the bottom of this page.

Finally, for more Windows Command Prompt Itechguides, visit our Windows Command Prompt page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.