One of the first things to learn when familiarizing yourself with the command prompt on Windows 10 is to change directories in the operating system file system. There are several ways you can do this. We will guide you through this.
First type "cmd" into the Windows search bar to open Command Prompt, and then select "Command Prompt" from the search results.
When the command prompt is open, you can change directories.
Changing directories using the drag-and-drop method
If the The folder you want to open in the command prompt is on your desktop or is already open in File Explorer. You can quickly switch to this directory. Type
cd followed by a space, drag and drop the folder into the window and press Enter.
The directory you have changed to is displayed on the command line.
Changing directories within the command prompt
It is not always convenient to open File Explorer and move it using drag & drop. For this reason, it is cool that you can also enter a command to change directories directly in the command prompt.
RELATED: 10 useful Windows commands you should know
Say, for example, that you are in your user folder and in the next file path there is a "Documents" directory ". You can enter the following command at the command prompt to change to this directory:
Note that this only works if you are in the immediate file structure. In our case this would be (user folder)> documents. In our current directory, we cannot use this method to jump to a directory that is nested two levels below.
So let's say we are currently in the user folder and want to continue with the instructions. The "Geek" folder, which is nested in "Documents". If we try to jump directly to "How-To Geek" without going to "Documents" first, the error shown in the image below is displayed.
Let's take one thing directory at a time. As already mentioned, we are currently in our user folder. We type
CD documents in the prompt to go to "Documents".
We are now in the "Documents" folder. To go one level down, type
cd on the command line, followed by the name of this directory.
Now suppose we are back in our user folder and would like to skip this additional step and jump two directories down. In our case this would be our "How-To Geek" folder. We enter the following command:
cd Documents How-To Geek
This allows us to move two directory levels with one command.
If you ever want to go to the wrong directory and return, enter the following command:
This way you can go up one level.
A navigation tip
To make your directory changes a little more efficient, type
cd on the command line, followed by the first few letters of the directory you want. Then press the Tab key to automatically complete the directory name.
Alternatively, you can type
cd . followed by the first letter of the directory, and then press the Tab key several times until the correct directory appears.
See Directory Contents
If you are ever lost and not sure where to go next, you can view the contents of your current directory by typing
This gives you an indication of which directory you need to navigate to next.