How to Change Directory in CMD on Windows 10

All Windows-related issues might be solved with a program named Command Prompt (CMD). You can feed the Command Prompt with executable commands to perform various administrative functions. For example, the cd or change directory command is used to change the directory path where you are working currently. For instance, the command cd\windows\system32 will switch the directory path to the System32 subfolder within the Windows folder. The Windows cd command is also called chdir, and it can be employed in both, shell scripts and batch files. In this article, you will learn how to change the directory in CMD on Windows 10.

How to Change Directory in CMD on Windows 10

What are Windows CWD and CD Command?

The Current Working Directory abbreviated as CWD is the path where the shell is currently working. The CWD is mandatory to retain its relative paths. The command interpreter of your Operating System holds a generic command called cd command Windows.

Type the command cd /? in the Command Prompt window to display the name of the current directory or changes in the current directory. After entering the command you will get the following information in Command Prompt (CMD).

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]
  • This .. Specifies that you want to change to the parent directory.
  • Type CD drive: to display the current directory in the specified drive.
  • Type CD without parameters to display the current drive and directory.
  • Use the /D switch to change the current drive /in addition to changing the current directory for a drive.

In addition to Command Prompt, Windows users can also use PowerShell to execute various commands as explained by Microsoft docs here.

What happens when Command Extensions are enabled?

If Command Extensions are enabled, CHDIR changes as follows:

  • The current directory string is converted to use the same case as the on-disk names. So, CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.
  • CHDIR command does not treat spaces as delimiters, so it is possible to use CD into a subdirectory name that contains a space even without surrounding it with quotes.

For example: command: cd \winnt\profiles\username\programs\start menu

is same as the command: cd “\winnt\profiles\username\programs\start menu”

Continue reading below to modify/switch to the directories or to a different file path.

Method 1: Change Directory By Path

Use the command cd + full directory path to access a specific directory or folder. Regardless of which directory you are in, this would take you straight to the desired folder or directory. Follow the given steps to do so:

1. Open the directory or folder which you want to navigate in CMD.

2. Right-click on the address bar and then select Copy address, as shown.

3. Now, press the Windows key, type cmd, and hit Enter to launch Command Prompt.

4. In CMD, type cd (the path you copied) and press Enter as depicted.

This will open the directory which path you copied in Command Prompt.

Method 2: Change Directory By Name

Another way for how to change the directory in CMD Windows 10 is to use the cd command to launch a directory level where you are currently working:

1. Open Command Prompt as shown in Method 1.

2. Type cd (directory you want to go to) and hit Enter.

Note: Add the directory name with the cd command to go to that respective directory. e.g. Desktop

Also Read: Delete a Folder or File using Command Prompt (CMD)

Method 3: Go To Parent Directory

When you need to go one folder up, use the cd.. command. Here’s how to change the parent directory in CMD on Windows 10.

1. Open Command Prompt as earlier.

2. Type cd.. and press Enter key.

Note: Here, you will be redirected from the System folder to the Common Files folder.

Method 4: Go To Root Directory

There are many commands to change the directory in CMD Windows 10. One such command is to change to the root directory:

Note: You can access the root directory irrespective of which directory you belong to.

1. Open Command Prompt, type cd /, and hit Enter.

2. Here, the root directory for Program Files is drive C, which is where the cd/ command has taken you.

Also Read: How to create empty files from the command prompt (cmd)

Method 5: Change Drive

This is one of the easiest methods on how to change the directory in CMD on Windows 10. If you want to change the drive in CMD then, you can do so by typing a simple command. Follow the steps listed below to do so.

1. Go to Command Prompt as instructed in Method 1.

2. Type the drive letter followed by : (colon) to access another drive and press Enter key.

Note: Here, we are changing from drive C: to drive D: and then, to drive E:

Method 6: Change Drive & Directory Together

If you want to change the drive and directory together then, there is a particular command to do so.

1. Navigate to Command Prompt as mentioned in Method 1.

2. Type the cd / command to access the root directory.

3. Add the drive letter followed by : (colon) to launch the target drive.

For Example, type cd /D D:\Photoshop CC and press Enter key to go from drive C: to Photoshop CC directory in D drive.

Also Read: [SOLVED] The file or Directory is corrupted and unreadable

Method 7: Open Directory from Address Bar

Here’s how to change the directory in CMD on Windows 10 directly from the address bar:

1. Click on the address bar of the directory you want to open.

2. Write cmd and press Enter key, as shown.

3. The chosen directory will open in Command Prompt.

Method 8: View Inside the Directory

You can also use commands to view inside the directory, as follows:

1. In Command Prompt, use command dir to view the subfolders and subdirectories in your current directory.

2. Here, we can see all directories within C:\Program Files folder.

Recommended

We hope this guide was helpful and you were able to change the directory in CMD Windows 10. Let us know which cd command Windows do you think is more useful. Also, if you have any queries or suggestions regarding this article, then feel free to drop them in the comments section.

Sign up and earn $1000 a day ⋙

Exploring the Features of IP Anonymizer Database

Exploring the Features of IP Anonymizer Database

In an era where online privacy and data protection have become paramount concerns for individuals and organizations alike, the need for effective tools to safeguard personal information is more critical than ever. The IP Anonymizer Database emerges as a vital resource for those seeking to navigate the complexities of digital anonymity.

TOP AI tools help you add color to old black and white photos

TOP AI tools help you add color to old black and white photos

TOP AI tools help you add color to old black and white photos. If you want to add color to old black & white photos, use one of the AI ​​tools below.

7 rules for storing a bank card

7 rules for storing a bank card

Each bank card is marked with important information - number, owner’s name, expiration date, CVC or CVV and a chip, thanks to which payments are made at terminals (including contactless). In order for this information to be preserved, it is important to treat the means of payment with care.

IObit Malware Fighter 11 Review 2024

IObit Malware Fighter 11 Review 2024

When your computer gets attacked by a virus or malware, you’ll certainly such for a powerful antivirus to fight back. Well, IObit Malware Fighter is exactly what you need. From its name alone, you can be certain that you are getting the tough protection your computer needs.

How To Find Quality And Fast Internet In Montreal

How To Find Quality And Fast Internet In Montreal

Montreal, a city brimming with culture, history, and Poutine (a famous Canadian dish), deserves an internet connection that can keep up. Whether you’re a streamer glued to Twitch, a workaholic juggling video conferences, or a casual web surfer, a reliable and fast internet plan is essential.

Google Drive for desktop will be discontinued in March 2018

Google Drive for desktop will be discontinued in March 2018

Google Drive for desktop will be discontinued in March 2018, Google has officially announced that it will stop supporting Google Drive for desktop and then the company will remove the application.

Simple ways to fix AirDrop not working error

Simple ways to fix AirDrop not working error

Simple ways to fix AirDrop not working error, AirDrop not working on iPhone, iPad, Mac what to do? This article will provide you with simple ways

TOP best computer screen recording software 2024

TOP best computer screen recording software 2024

TOP best computer screen recording software 2024, Which is the best lightweight, free, high-quality computer screen recording software? Let's find out the top with WebTech360

What is an email address? How to get an email address?

What is an email address? How to get an email address?

What is an email address? How to get an email address?, What is an email address? What is email address entry? This article will answer all your related questions

Every WhatsApp shortcut for computer you need to know

Every WhatsApp shortcut for computer you need to know

Every WhatsApp shortcut for your computer you need to know, WhatsApp is one of the most popular free messaging apps today. The keyboard shortcuts below will help

Unlocking Baccarats Social Thrills: Tedbets Global Gaming Hub

Unlocking Baccarats Social Thrills: Tedbets Global Gaming Hub

Discover the vibrant social scene of baccarat on Tedbet, where players worldwide connect, chat, and enjoy the excitement of live dealer games.

Summary of how to find videos on TikTok

Summary of how to find videos on TikTok

Summary of how to find videos on TikTok, Finding videos on TikTok is not difficult. Let's learn together how to find the original video on TikTok or find the Tik Tok clip you want to watch

Improved mouse sensitivity for Free Fire on BlueStacks

Improved mouse sensitivity for Free Fire on BlueStacks

Improved mouse sensitivity for Free Fire on BlueStacks, BlueStacks has made important improvements for Free Fire gamers. Please upgrade BlueStacks 4.230.10

Huang you: Butter Camera sparkling photo editing app

Huang you: Butter Camera sparkling photo editing app

Huang you: Sparkling photo editing application Butter Camera, Huang you (黄油 相机) is an extremely hot Chinese editing application today, here we would like to invite you

Tips for using Chrome Web Store you need to know

Tips for using Chrome Web Store you need to know

Tips for using Chrome Web Store you need to know, Chrome Web Store or Chrome Web Store offers a selection of apps, extensions and stylish browser wallpapers

What is CapCut? Is it safe to use CapCut?

What is CapCut? Is it safe to use CapCut?

What is CapCut? Is it safe to use CapCut?, What is CapCut? Is music on CapCut copyrighted? Let's find out with WebTech360 what you need to know about CapCut!

Why is buying TikTok coins cheaper on PC?

Why is buying TikTok coins cheaper on PC?

Why is it cheaper to buy TikTok coins on PC?, TikTok gives users the option to exchange real money for coins in the app. However, buying TikTok coins on PC is cheap

How much Internet capacity does Zoom use?

How much Internet capacity does Zoom use?

How much Internet capacity does Zoom use?, Zoom is an indispensable remote online learning and working software during the epidemic, but it can be extremely bandwidth-consuming.

EmuOS: Relive your childhood with legendary games of the past

EmuOS: Relive your childhood with legendary games of the past

EmuOS: Relive your childhood with legendary games of the past, EmuOS is a Web interface that simulates basic Windows 3.1, 95, 98, NT operating systems that provide a lot

TOP best ways to open and read PDF files on your computer

TOP best ways to open and read PDF files on your computer

TOP best ways to open and read PDF files on your computer. How to open PDF files on your computer is not too difficult. In fact, you have many ways to read PDF files. Join WebTech360