Home >> FAQ Center >>Change Directory in CMD Via Command Line

How to Change Directory in CMD On Windows 10 Via Command Line0

Command prompt is the basic tool which can be used for many purpose like changing date, time, repairing some other issues. Command prompt is also called as cmd or cmd.exe i.e. after the name of execution file. The first prototype of command prompt was launched in Windows NT. It was created by Therese Stowell for basic control purpose of the PC. But it can also be used as a method of how to change drive in cmd.

Part 1. What is cd (Change Directory) command?

cd or Change Directory is the command which is the answer for how to change directory in command prompt. This command is used for changing the folder. In simpler terms it is a navigation command. The command "CD\" can take the user to the top of the directory tree i.e. in the C: drive. As the command prompt is not case sensitive so writing the command as "CD" or "cd" is more or less same. The command "cd\" or "CD\" will prompt the user to the root drive i.e. "C:" drive.

If the user wants to go to a specific folder via "CD" command then he or she should write the name of that folder after "cd" with a backslash i.e. "\". If the user wants to reach the folder named as "System32" in the Windows folder of C: drive then put the command like this "cd\windows\system32\" and press "Enter" from the keyboard.

It will take the use to "System32" folder. The user can also trace back to one folder back by "cd.." command. Just put "cd.." in the command line and press "Enter" from the keyboard.


Part 2. How to Change Directory in CMD on Windows 10?

Command prompt is one of the most used tools of Windows operating system. The process of command prompt change directory is not tough hence it is a mystery to most people. The steps for changing directories through the command line is as mentioned as below

Restarting the Windows Explorer is the easiest fix to solve the problem of the taskbar. Usually, Windows explorer resets itself if the taskbar is not working correctly, but if it does not then follow these simple steps to make it

1. First open Start and type in "Command Prompt" and search for it.

2. Make a right click on it after finding "Command Prompt" and then select "Run as administrator" from the drop down menu.

mmand prompt run as administrator

3. Click on "Yes" on the popped up User Account dialog.

4. To get the names of all the directories available on the PC type in "dir" command in the command line and press "Enter" from the keyboard

5. Within the directory list select the folder which is desired to be reached. Then type the name of the folder after command "cd" with backslash i.e. "\" behind the folder's name.


6. After reaching the desired directory user can again use the "dir" command to see the contents of the directory i.e. files and folders present in it

dir cmd

7. User can change the directory by same "cd" command. Just type command "cd" before the name of the directory and press "Enter" form the keyboard

8. To start fresh i.e. to return back to the root directory use "cd/" command. Just type the said in the command line and press "Enter" from the keyboard.

Part 3. How to Change Drive and Directory in CMD with Single Command?

The basic cd command does not work if you are trying to change to a directory that is located on a different drive. Say you are in C:\users\cmdadmin\ directory and want to change to E:\docs directory. If you run 'cd e:\docs' you won't get any error but you would still be in the same folder. In this case you can use /d option with cd command.

Note: To change the directory and the drive at the same time, first, we need to know what directories are available on the PC. To get the information type "dir" in the command line and press "Enter" from the keyboard. It will list all the directory names in the command window.

Cd /D E:\docs

This command changes to the drive E: and also changes the directory to E:\docs.

change directory and drive

If the command line above didn't work for you, you can use the pushd command instead. Usually, the "pushd" command is used for merging the "cd" command with "D:" command. Pushd can remember all the previous directories you traversed as long as you change the directory using pushd instead of cd command. Using popd you can go back to all the previously visited folders in the reverse order.

It is done as given below:

"C: Temp>pushd D:\A\B" and press "Enter" from the keyboard

Where "A" is the directory and "B" is the sub-folder in the directory.

To come back to the root directory "popd" command is used just as below

"D:\A\B>popd" and press "Enter" from the keyboard.

With all this the confusion around "how to navigate in CMD?" is cleared. Except for switching directories and drives via command prompt, there are other problems like forgetting the password, which makes people suffer a lot. But with the use of a simple tool named Windows Password Key , one can easily deal with problems related to a lost password of WINDOWS 10 PC.

Recommended Product
  • Reset/Remove Windows admin and other user password for local/domain account.
  • Create a new local/domain admin account to unlock your computer.
  • Change your Microsoft account password offline.
  • Fully support Windows 10/8.1/8/7/Vista/XP, Windows Server 2012 (R2)/2008 (R2)/2003 (R2).
Free Download
Related Articles
How to Disable Windows 10 Lock Screen
The Top 3 Methods to Back Up Windows 10 PC
How to Remove Eye Symbol from Password Field in Windows 10

comments powered by Disqus
Other pages
Windows Password Recovery
How-to Articles
Product Tour

Feel free to contact us any time!
Hot Topics
Windows 10 Password Reset Tool
Lost Windows 8 password reset
Bypass Windows 7 Password
Lost Windows XP password reset
Windows password news and tips
Change Laptop login Password
About US
4WinKey is a brand which owned by PassFab Inc. Since 2007, PassFab has become leader of developing Windows password reset tools. Learn more >>

Copyright © 2007-2021 4WinKey.