How to change the folder in Command Prompt on Windows 10
One of the first things you need to learn when you become more familiar with the Command Prompt on Windows 10 is how to change the folders in the file system of the operating system. The following article will guide you to implement them.
One of the first things you need to learn when you become more familiar with the Command Prompt on Windows 10 is how to change the folders in the file system of the operating system. There are several ways you can do this, so the following article will guide you through them.
Change directories by drag and drop method
If the folder you want to open in Command Prompt is on the screen or opened in File Explorer, you can quickly change it. Enter cd
followed by a space, drag and drop the folder into the window, and then press Enter
.
The directory you move to will be reflected in the command line.
The directory you move to will be reflected in the command lineChange the directory right in Command Prompt
It is not always convenient to open File Explorer, then drag and drop. That's why being so great at typing a command to change the directory right in the Command Prompt is so great.
For example, you are in the user directory and there is a Documents folder in the next file path. You can type the following command in Command Prompt to switch to that directory:
cd Documents
Note that this only works if you are in the temporary file structure. In the example case, that would be (user directory)> Documents . In the current directory, this method cannot be used to navigate to a nested directory on two levels.
So, suppose you are currently in the user directory and want to move to the How-To Geek folder , located in Documents. If you try to jump straight into How-To Geek without going to Documents , you will get an error like in the image below.
An error will occur if you move to a nested folder on two levelsAs mentioned earlier, you are currently in the user directory. Type cd Documents
in Command Prompt to access Documents.
You are now in the Documents folder . To move down another level, enter cd
on the command line followed by the name of the directory.
Now, suppose you go back to the user directory and want to skip the extra step to jump down two directory levels. In the example case, this will be the How-To Geek folder . Type the following command:
cd DocumentsHow-To Geek
This allows moving 2 directory levels with one command.
cd DocumentsHow-To Geek
Move 2 levels of folders with one command If you've entered the wrong directory and want to go back, type the following command:
cd. .
This command allows you to move up one level.
Move up one directory levelNavigation tips
If you want to make a little more efficient change of directory, enter cd
the command line, followed by the first few letters of the directory you want. Then, click Tab
to automatically complete the folder name.
Alternatively, you can type cd
, followed by the first letter of the folder, then press Tab
multiple times until the correct folder appears.
View directory content
If you're disoriented and don't know where to go next, you can view the contents of the current directory by typing dir
in the command line.
This will give you a hint on which folder to navigate next.
You should read it
- How to use the command history function in Command Prompt
- Add Command Prompt to Power User Menu on Windows 10
- How to Execute a Program in Command Prompt
- How to Open Folders in CMD
- How to Change Directories in Command Prompt
- How to open Command Prompt on Windows 10, 8, 7, Vista and XP
- Instructions for using Command Prompt
- How to customize the Command Prompt on Windows
- How to find and open files with Command Prompt
- How to Make Command Prompt Appear at School
- 6 Best Command Prompt Alternatives for Windows
- How to Customize the Font in Windows Command Prompt