The Command Prompt, also known as cmd.exe, is a command line interpreter in the Windows operating system that has been in use since the DOS days of Microsoft operating systems. The command prompt, which is available as an alternative to the Windows GUI, provides far more control and functionality to the average Windows user than the normal GUI ever could. However, before you can do anything with the Command prompt, you’ll need to learn how to change directories in it. We’ve covered some of the simplest ways to change your Command prompt directory in Windows 10/11 in this article.
Let’s get started.
Related: How to Backup Files in Windows 11 and downgrade to Windows 10
How to change the Command prompt directory
On Windows 10/11, there are a variety of options for changing the Command Prompt directory. First, we’ll look at the cd command, which is probably the most straightforward of them all. Let’s get started.
Method 1: Change your Command prompt directory with cd command
The cd command, which stands for Change Directory, allows you to easily move from one directory (folder) to another.
Simply press Enter after typing ‘cd’ into the Command prompt. You’ll be immediately taken to the top of your Command prompt directory. You’ll be taken to the root directory in the Windows “C:” drive, as you can see on your Command prompt screen.
Simply type cd followed by the directory name to get to a specific location. For example, we went to the Downloads directory, which is located in the root directory of our Windows 10 installation.
You may need to enclose the name in quotes for multiple word directories, such as cd “folder1” – one tip here is that you can start typing a directory name and then hit the tab 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 tab key to cycle through the possibilities.
Alternatively, instead of going straight to the root directory, you can add.. after the cd command to return to the previous folder. So, as we did in Windows 11, open your Command prompt, type cd…, and hit Enter.
Method 2: Changing the drive in Command prompt
If you want to change your directory completely, type the drive name followed by :. So, if you’re currently in the “C:” drive and want to switch to your “D:” drive, simply type “D:” in the Command prompt and press Enter.
Another thing to remember is that the Command prompt is case-insensitive, which means it accepts both capital and lowercase letters. It doesn’t matter if you type “D:” or “d:”; the Command prompt will treat them both the same.
The dir command is another command that deserves special attention. You’ll see a list of files and folders inside the parent directory if you type dir in the Command prompt.
Now, if you want to go inside a specific directory from here, simply use the cd command, followed by the directory’s name, as we did earlier.
Method 3: Change directories in CMD by dragging the folder
Here, you can use both the GUI and the Command prompt. In the Command prompt, type cd, then drag the folder you want to move into the Terminal and press Enter.
The command prompt will switch to the desired folder right away.
Changing directories in Command prompt
If you want to become a Terminal pro, changing your terminal directories is just one of the many hacks you’ll learn along the way. Make no mistake: this is just the beginning, and you’ll learn a lot more as you delve deeper into the Command prompt.
No Responses