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. 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 cdfollowed 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.

How to change the folder in Command Prompt on Windows 10 Picture 1 The directory you move to will be reflected in the command line

Change 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.

How to change the folder in Command Prompt on Windows 10 Picture 2 An error will occur if you move to a nested folder on two levels

As mentioned earlier, you are currently in the user directory. Type cd Documentsin Command Prompt to access Documents.

You are now in the Documents folder . To move down another level, enter cdon the command line followed by the name of the directory.

How to change the folder in Command Prompt on Windows 10 Picture 3 Need to move in turn to each folder level

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
How to change the folder in Command Prompt on Windows 10 Picture 4 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.

How to change the folder in Command Prompt on Windows 10 Picture 5 Move up one directory level

Navigation tips

If you want to make a little more efficient change of directory, enter cdthe command line, followed by the first few letters of the directory you want. Then, click Tabto automatically complete the folder name.

How to change the folder in Command Prompt on Windows 10 Picture 6 Press Tab to autocomplete folder name

Alternatively, you can type cd, followed by the first letter of the folder, then press Tabmultiple times until the correct folder appears.

How to change the folder in Command Prompt on Windows 10 Picture 7 Press Tab repeatedly 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 dirin the command line.

How to change the folder in Command Prompt on Windows 10 Picture 8 View directory content

This will give you a hint on which folder to navigate next.

3.7 ★ | 6 Vote

May be interested

  • How to customize the Command Prompt on WindowsHow to customize the Command Prompt on Windows
    command prompt is a powerful tool that many people like to use. however, it looks a bit boring and unfriendly. fortunately, you can customize the command prompt according to your needs and preferences.
  • Instructions for using Command PromptInstructions for using Command Prompt
    deep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
  • 6 Cool Tricks You Can Do in Windows Command Prompt6 Cool Tricks You Can Do in Windows Command Prompt
    command prompt has a ton of capabilities, and many people doubt they know what a few lines of code can do. next time you're bored with your pc, try these cool command prompt tricks for yourself.
  • How to Copy Files in Command PromptHow to Copy Files in Command Prompt
    this wikihow teaches you how to use windows' command prompt program to copy a file or folder. find out your file's location. you'll need the file's location—also known as a 'directory'—in order to tell command prompt where to look for the f...
  • How to Customize the Font in Windows Command PromptHow to Customize the Font in Windows Command Prompt
    many people work regularly with the windows command prompt. one of the main problems users encounter, however, is the difficulty of achieving the same look every time one works with the command prompt interface. this article is intended to...
  • 6 Best Command Prompt Alternatives for Windows6 Best Command Prompt Alternatives for Windows
    do you find the command prompt a bit complicated and feel you need a tool that is easier to use? this is where other terminal emulators come into play!
  • How to Make Command Prompt Appear at SchoolHow to Make Command Prompt Appear at School
    this wikihow teaches you how to access command prompt on a windows 10 school computer. although you may be able to open command prompt if only the file path to command prompt is blocked, there is no way to bypass an administrator lock on...
  • Windows promptWindows prompt
    the prompt command changes the command prompt cmd.exe file.
  • How to Create a Custom Windows Command PromptHow to Create a Custom Windows Command Prompt
    the windows command prompt (located at c:windowssystem32cmd.exe) is a useful tool to perform various administrative tasks. the prompt is a string of characters (special and non special) that are displayed whenever the command prompt is...
  • How to Change Your Computer's Date and Time Using Command PromptHow to Change Your Computer's Date and Time Using Command Prompt
    today's tipsmake will show you how to change the date and time on a computer running windows operating system through the command prompt application. if you don't have administrator access, you won't be able to change the date and time.