How to change directory in CMD in Windows 10

How to change directory in CMD in Windows 10

Knowing how to change directory in CMD in Windows 10 may be considered a thing of the past.

Although, there’s no denying that it still remains relevant to this date.

Windows 10 gives its users the opportunity to not only run advanced complex commands, but also the basic ones to make the most out of Command Prompt.

You can easily access your desired directories, run a batch file, and much more with Windows Command Prompt without any hassle – just by punching a few keys from your keyboard.

In this article, we will be showing you the simplest way to change the current working directory and navigate through different directories in Command Prompt (CMD) on your Windows 10 PC.

Table of Contents

  1. How to change directory in CMD in Windows 10
    1. What exactly is a directory?
    2. Changing drive in Command Prompt
  2. Wrap Up

How to change directory in CMD in Windows 10

When we talk about Command Prompt, the directories are not accessed the way you access folders on the File Explorer.

If you’re not a fan of clicking through subfolders one by one, then you would love the Command Prompt method.

Furthermore, you can do much more through the Windows command line than just accessing or changing directories.

We’ll show you some other basics as well after we’re done with changing the directory. So, without further ado, let’s get right into it.

  • The first thing you have to do is to open Command Prompt. Type cmd in the Windows Start menu;
How to change directory in CMD in Windows 10

  • You have to use the “CD command” (Change Directory) along with the name of the directory you want to access. For example, here we will access the “Assignments” folder in drive D by typing “cd Assignments“;

  • Here’s another example but this time we will be going in the C drive. Suppose we want to access the System32 folder which can be found in the Windows folder located in the C drive letter. Type “cd windows\system32” and then press the enter key;

  • Command Prompt will now allow you to access the System32 directory. You can also do the same for other different directory paths. Simply type “cd (insert directory address)”  before pressing the Enter key and let Command Prompt do the rest.

What exactly is a directory?

A directory in an operating system can be referred to as a place where you find pathways to other files.

Your PC has a directory tree. At the root of this tree, you will find the parent directory that holds all the subdirectories inside it.

Now in Windows 10, directories may also be called folders depending on what they hold within them.

However, a folder usually contains all sorts of files while directories typically contain subdirectories and trails that lead to other files, quite similar to the example of a traditional office cabinet with organized files.

Changing drive in Command Prompt

By default, Command Prompt gives you access to the C drive in your PC as there’s where most of your computer’s relevant data is stored.

However, you can also access other drives by simply adding “:” after typing the drive’s letter.

For example, if you want to access the D drive through Command Prompt, type “D:” and then press Enter. You can now access the files and folders located in Drive D.

Here are a few more tips to help you navigate through directories easily.

  • Want to quickly access a folder’s contents through Command Prompt? First type “cd” then drag the folder’s icon into the Command Prompt window from your desktop or Windows Explorer;
  • If you want to go to a parent directory and exit from the current directory, use the “cd..” command;
  • You can also jump right to the root directory straight by typing “cd\“;
  • If you want Command Prompt to display the accessible subdirectories altogether, the DIR command will be of great help. Simply type “dir” after accessing a drive and hit enter. The CMD window will list all the files and folders along with some basic info about them;
  • Lastly, commands don’t require being typed in capital letters. You can write “d:” or “D:“, “CD” or “cd” and Command Prompt will pick both commands in the same way.

Wrap Up

Now that you know how these commands work, make sure you practice them if you want to truly master the art of working with the command line interface.

Keep in mind that any causes of errors such as a command not being executed might be the specific folder or directory not existing anymore or a typo in the command.

So, make sure you’ve typed the right command for the right task.

We hope our article helped you understand the basic operations of Command Prompt.

Check out some of our other awesome articles: