How to Change Directory in CMD Windows 10

Posted on

Windows Command Prompt is an amazing built-in tool that offers you to run programs by using the command-line option. Using the command, you are able to perform many things instantly on your Windows computer like troubleshooting and solving certain kinds of issues, switching or changing directory, 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 are going to show you how to change directories in Command Prompt on Windows 10. One of the first things that you will need to learn as you become more familiar with Command Prompt on Windows 10 is how to change directories in the operating system’s file system.


Apparently, there are a few ways you can do this, so we are going to walk you through them. First, you have to type “cmd” in the Windows Search bar to open Command Prompt. Then, you are able to choose “Command Prompt” from the search results. With Command Prompt opened, you are ready to change directories.


If the folder you want to open in Command Prompt is on your desktop or already open in File Explorer, so you are able to quickly change to that directory. Please type cd followed by a space, drag and drop the folder into the window, and then press Enter. The directory you switch to will be visible on the command line.


It is not always simple to open File Explorer and drag and drop. That is why it is cool that you are also able to type a command to change directories right in Command Prompt. For example, you are in your user folder, and there is a “Documents” directory in the next file path. In this case, you are able to type the following command in Command Prompt to switch to that directory:

cd Documents

Remember this only works if you are in the immediate file structure. In our case, that will be (user folder) > Documents. In our current directory, we will not be able to use this method to jump to a directory nested two levels down. So, let us say you are currently in the user folder and want to go to the how to geek folder, which is nested in Document. If you try to jump straight to how to geek without first going to Document, you get the error shown in the screen. For now, let us take things one directory at a time. As we explained previously, you are currently in our user folder. You are able to type cd Document in Command Prompt to visit Documents. Now, you are in the document folder. To move down another level, you have to type cd on the command line followed by the name of that directory.

Right now, let us say that you are back in your folder and want to skip that extra step and jump two directories down. In this case, this will be “How-To Geek” folder. You are able to type the following command:

cd Documents\How-To Geek

This offers you to move two directory levels with one command. If you ever go to the wrong directory and want to turn back, please type the following command:

cd . .

This allows you to move up a level.


If you want to be a bit more efficient with your directory changes, you are able to type cd on the command line, followed by the first few letters of the directory you want. After that, you have to press Tab to autocomplete the directory name. In alternative, you are able to type cd, followed by the first letter of the directory. Then, simply press Tab multiple times until the correct directory appears.


If you are ever lost and not sure where to go next, you are able to see the contents of your current directory by typing dir on the command line. Simply, you are able to see the contents of a folder by using a command called DIR. To test it, we have made a folder named Digital_Citizen on the D: drive, with some files and subfolders. The last time, our working folder was “C:\Windows.” To navigate to the folder, you have to use the command “cd /d D:\Digital_Citizen.” To view the contents of the folder, please type DIR, and press Enter.


You will be able to make a new folder by using the MKDIR (Make Directory) or the MD command. The syntax of those commands is “MKDIR Folder” or “MD Folder.” Let us say that you need to make a new folder called Digital_Citizen_Life which is going to be placed in the “D:\Digital_Citizen” folder. To do that, you need to type “mkdir Digital_Citizen_Life” and then press Enter. To test if it worked, you have to use the DIR command again. The newly made folder appears in the list. Do not forget that all those commands depend on the current location in the Command Prompt. For example, if you are on the “C:” drive and type “MKDIR test,” the new folder is made in the root of the “C:” drive.

Another way to make a folder that does not involve being in the desired folder is to type the complete path of the new folder. For instance, if you are working on the “D:” drive and you want to make a new folder in “C:,” called other_stuff, please type “mkdir c:\other_stuff” and then press Enter. Once you need to make a folder with subfolders at the same time, you are able to use the “MKDIR Folder\Subfolder” command. For example, if you type “mkdir Digital_Citizen_Tests\Beta\Test1” three folders are made: Digital_Citizen_Tests, Beta and Test1, in a tree-like structure.

Leave a Reply

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