TodayWindows

How to change directories in CMD (Command prompt) in Windows 10 or Windows 11

The Command prompt, sometimes also referred to as cmd.exe in short, is a command line interpreter in Windows operating system, and has been in use since the earliest days of Microsoft operating systems, dating back to the DOS days.

Offered as an alternative to Windows GUI, the command prompt offers far more control and functionalities to the average Windows user, than the normal GUI ever can.

But, before you can perform any wizardry with the Command prompt, you’ll first have to learn how to change directories in it. In this article, we’ve covered some of the easiest methods to change your Command prompt directory in Windows 10/11.

Let’s jump right in.

3 ways to change the Command prompt directory

There are a plethora of ways to change the Command prompt directory on Windows 10/11. First, we’ll begin with what is most probably the most straightforward of them all: the cd command. Let’s go.

Change your Command prompt directory with cd command

The cd command, short for Change Directory, lets you jump from one directory (folder) to another without any hassles.

Simply type in ‘cd’ in the Command prompt and hit Enter. From there, you’ll be taken to the top of your Command prompt directory instantly. As you will see on your Command prompt screen, you’ll be taken to the root directory in Windows “C:” drive.

To move in to a particular directory, just enter cd followed by the directory name . For instance, we moved in to the Downloads directory located inside the root directory of our Windows 10 here.

For multiple word directories, you may have to enclose the name in quotes, for example cd “onenote notebooks” – one tip here, 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 (say files 1, files 2, files 3, etc) keep hitting the tab key and Windows will cycle through the possible matches.

Alternatively, instead of going straight to the root directory, you can also go back to the previous folder by adding ..  after cd command. So, go into your Command prompt, type in cd .., and hit Enter, as we’ve done in our Windows 11.

Running the cd command in cmd

Changing the drive in Command prompt

If, in contrast, you want to change your directory altogether, then you’ll have to type the drive name, followed by :. So, if you’re in the “C:” drive right now, and you’d like to move in to your “D:” drive, just type in “D:” in the Command prompt and hit the Enter.

Another thing to keep in mind is that the Command prompt is case-insensitive, meaning that it treats capital and small case letters as the same. So, it doesn’t matter if you type “D:” or “d:”—the Command prompt will interpret both of them as the same.

Another command that deserves a special mention is the dir command. Type in the dir in the Command prompt and you’ll see a list of files and folders inside the parent directory.

Running dir command in cmd in windows 11

Now, if you want to go inside a specific directory from here, just use the cd command from above, along with the name of the directory, as we did above.

Change directories in CMD by dragging the folder

You can also use the GUI along with the Command prompt here. Type in cd in the Command prompt, drag the folder that you want to move in into the Terminal, and hit Enter.

The Command prompt will directly switch to the desired folder.

Changing directories in  CMD (Command prompt)

If becoming a Terminal pro is what you’re after, then being able to change your terminal directories is just one of many hacks you’ll be mastering along the way. Make no mistake, as this is only the beginning, and you’ll be learning a lot more when you dive into the Command prompt more deeply.

Share This Post:

Source link

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button