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 ⋙

What should I do if Netflix is ​​hacked?

What should I do if Netflix is ​​hacked?

What should I do if my Netflix account is hacked? What should I do if my Netflix account is hacked? Here's what you need to know when your Netflix account is hacked.

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know. LDPlayer is one of the most popular Android emulators on computers today. This article will provide it to you

Shortcuts in Blender that users need to know

Shortcuts in Blender that users need to know

Shortcuts in Blender that users need to know. Blender shortcuts help you work faster when designing graphics. Therefore, WebTech360 will synthesize the keys for you

Kahoot hacking tips you may not know

Kahoot hacking tips you may not know

Kahoot hacking tips you may not know, how to hack Kahoot to get answers to difficult questions? This article will suggest you some of the simplest Kahoot hacks.

What is Google TasksBoard?

What is Google TasksBoard?

What is Google TasksBoard?, Google TasksBoard is a new task management app, helping you increase work efficiency. Let's learn with Donwload.vn how to use Google TasksBoard

Is Google Takeout a good data backup option?

Is Google Takeout a good data backup option?

Is Google Takeout a good data backup option?, Google Takeout comes from a line of free services from Google. Google says it will help users download it

Host permissions and how to specify co-host in Zoom

Host permissions and how to specify co-host in Zoom

Host rights and how to designate co-host in Zoom. How to regain host rights on Zoom is not difficult. This article will introduce you to host and reclaim host details

6 steps to become a Pinterest expert

6 steps to become a Pinterest expert

6 steps to become a Pinterest expert, Pinterest is a tool for collecting, organizing, and sharing photos and videos you glean from the Internet. Here are 6

3 ways to edit sunsets in Photoshop

3 ways to edit sunsets in Photoshop

3 ways to edit sunset in Photoshop, Sunset is always a scene that every photographer wants to capture. However, taking sunset photos is not easy. Wear

Convert text to speech online

Convert text to speech online

Convert text to speech online. If you want to listen to the pronunciation on Google Translate or Google Translate, users can download this voice to your computer easily.

(2024) The Best Free Cloning Software for Windows 10/11

(2024) The Best Free Cloning Software for Windows 10/11

Are you looking for the free cloning software for Windows 10? This passage will share you the best free Windows 10/11/7 cloning software in 2024.

Steps to create a new database in Access

Steps to create a new database in Access

Steps to create a new database in Access, Steps to create a new database in Microsoft Access are not difficult. This article will guide you in detail on the steps to build muscle

3 ways to save files better on your computer

3 ways to save files better on your computer

3 better ways to save files on your computer, How to save files on your computer is not difficult. However, what is the best way to save on the computer? Let's find out with Dowload.vn

10 poems for the first day of school in 2023 - 2024

10 poems for the first day of school in 2023 - 2024

10 poems for the opening day of school in 2023 - 2024, TOP 10 short and unique poems for the opening day of the new school year. We invite you to follow along!

Things you should do first when buying a Samsung smartphone

Things you should do first when buying a Samsung smartphone

Things you should do first when buying a Samsung smartphone, Samsung phones contain a lot of applications and settings. Here are the settings you should do when

The easiest ways to create borders for photos

The easiest ways to create borders for photos

The easiest ways to create borders for photos, Adding frames to photos is not difficult and you have a lot of options. This article will summarize for you ways to add frames to beautiful photos

Office 2021 vs. Microsoft 365: Which software is right for you?

Office 2021 vs. Microsoft 365: Which software is right for you?

Office 2021 vs. Microsoft 365: Which software is right for you?, Office 2021 and Microsoft 365 can both meet office editing tasks. So Office 2021

Gemini - Googles artificial intelligence model

Gemini - Googles artificial intelligence model

Gemini - Google's artificial intelligence model, Google launches Gemini - an artificial intelligence model competing with OpenAI's GPT-4, this is an artificial intelligence model

What is rendering?

What is rendering?

Rendering is the process of creating an image from a model into a movie scene or image using computer software.

What is CPU? What are the popular CPU types today?

What is CPU? What are the popular CPU types today?

The CPU is the data processing center, or simply understood, it is the brain that controls most of the rest of the components in a computer.