How to change directory in CMD (command prompt) in Windows 10 or Windows 11
The Command Prompt, sometimes also called cmd.exe in short, is a command line interpreter in the Windows operating system and has been used since the earliest days of Microsoft operating systems, dating back to the days of DOS.
Offered as an alternative to the Windows GUI, Command Prompt offers much more control and functionality to the average Windows user than the regular GUI.
But, before you can perform witchcraft with Command Prompt, you must first learn how to modify the directories in it. In this article, we have covered some of the easiest methods to change your Command Prompt directory in Windows 10/11.
Let’s go right in.
3 ways to change command prompt directory
There are tons of ways to change Command Prompt directory in Windows 10/11. First, we’ll start with what’s probably the easiest of all: the CD order. Let’s go.
Change your command prompt directory with the cd command
The cd command, short for Change Directory, allows you to switch from one directory (folder) to another without any problem.
Just type “cd” in the command prompt and press Enter. From there, you’ll be instantly taken to the top of your Command Prompt directory. As you will see on your command prompt screen, you will be redirected to the Windows root directory ” VS : “ drive.
To access a particular directory, simply enter CD followed by the directory name. For example, we moved into the Downloads directory located inside the root directory of our Windows 10 here.
For directories with multiple words, you may need to put the name in quotes, for example cd “onenote notebooks” – a tip here, you can start typing a directory name and then press the tongue key, and Windows will fill in the name for you. If you have multiple directories with similar names (for example, files 1, files 2, files 3, etc.) keep pressing the button tongue and Windows will cycle through the possible matches.
Alternatively, instead of going directly to the root directory, you can also go back to the previous folder by adding .. after CD order. So go to your command prompt, type cd .., and hit Enter, as we did in our Windows 11.
Change drive in command prompt
If, on the contrary, you wish to completely change the directory, you will have to type the name of the drive, followed by :. So if you are in the ” VS : “ drive now and you would like to move into your “D:” drive, just type “D:” in the command prompt and press the Enter.
Another thing to keep in mind is that Command Prompt is case insensitive, which means it treats upper and lower case letters the same. So it doesn’t matter whether you type “D:” or “d:”: the command prompt will interpret both as the same thing.
Another command that deserves special mention is the real order. Type it real in the command prompt and you will see a list of files and folders in the parent directory.
Now if you want to go to a specific directory from here just use the CD command above, as well as the directory name, as we did above.
Change directory in CMD by dragging the folder
You can also use the GUI with the command prompt here. Type CD in the command prompt, drag the folder you want to move to in the terminal and press Enter.
The Command Prompt will switch directly to the desired folder.
Changing directories in CMD (command prompt)
If you want to become a terminal pro, being able to change directories on your terminal is just one of the many hacks you’ll master along the way. Make no mistake about it, because this is just the start, and you’ll learn a lot more as you dive deeper into the Command Prompt.