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 directory, and more.
As a Windows user, you must 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 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-
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:
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.
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 pathname of the 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!