Windows Command Prompt is a great built-in tool that allows you to run programs using the command-line option. Using the command, you can perform a lot of things instantly on your Windows computer like troubleshooting and fixing certain kinds of challenging issues, switching or changing directories, and more.
As a Windows user, you need to be well familiar with the basic commands and usage of the Command Prompt. In this guide, we will show you how to change directories in Command Prompt on Windows 11/10.
How to change Directory in CMD
If you want to change the directory in the Command Prompt, you have three options:
- Use Dir and CD command to change directories
- Use the Drag and Drop method
- Using the Tab key.
1] Using DIR and CD commands
To get started, open the Windows search using Win+Q keyboard shortcut.
In the text area, type cmd and then select Command Prompt from the result list.
Once you open the command prompt, type dir command to see the list of all subdirectories in the current folder.
In the above screenshot, you can see the list of all directories available in my folder named “digvi”.
Now suppose you want to change the current directory with the Documents folder from the list.
To do so, type cd followed by a space, type Documents and then hit Enter-
cd Documents
If you think you are in the wrong directory and want to change the directory then you first need to move a level back.
To do that, type the below commands and hit Enter:
cd ..
After turning back, type cd followed by a space and then type the new directory name you want to change.
cd space <directory name>
Make sure to remove the brackets from the above command-line and then press the Enter key.
For reference, you can see the above image, where I have changed the Documents directory to Downloads directory.
Once you change the directory name, again type dir to see the contents of the directory.
Read: How to delete files and folders using Command Prompt.
2] Using Drag and Drop
In case the folder you have to change is present on your computer screen, use the drag-and-drop method to reflect the path name of the folder.
Read: Ways to open Command Prompt in a folder.
3] Using the Tab key
Additionally, you can use the Tab key to type the directory name quickly.
To do this, type cd > space > the first few letters directory name, then hit the tab key.
Hope this helps!
How do I change directory C to D in cmd?
To change from the ‘C:’ drive to the ‘D:’ drive in Command Prompt, simply type the drive letter followed by a colon (D:
) and press Enter. This will switch the current working directory from ‘C:’ to ‘D:’. If you want to change the directory to a specific path within the D: drive without first switching to the drive, you may use the ‘/d’ switch with the cd command. Type cd /d
followed by the path to the directory you want to navigate to, including the drive letter. This will allow you to change both the drive and directory in a single step.
What is the CD command in cmd?
The CD command in Command Prompt is used to change the current directory to a different directory on a Windows 11/10 PC. CD, also known as chdir, stands for ‘change directory’. The command helps you to navigate through your computer’s directory structure, allowing you to change to a directory within the current drive or on a different drive, go to the root directory of the current drive, and go up one directory level.
Read Next: How to restore the Registry using Command Prompt in Windows.