How to Change Directory/Path in Cmd (Command Prompt) on Windows 10

When you are working with Command Prompt, you may want to change the directory/path/folder. Indeed, to change any directory in Command Prompt, at least you have to use an administrator account. Of course, there are plenty of ways that you can do to change the directory or path in Command Prompt. Let’s find out in the below!

How to Change Directory/Path in Cmd (Command Prompt) on Windows 10

At least, there are some  different methods that you can take to change the directory or path or folder in Command Prompt on Windows 10. So, here’s how to do it:

Method 1: Change the Directory using CMD (Command Prompt)

In the first method, you definitely will be guided to change the directory or path by directly using Command Prompt.

Step 1: Open the Command Prompt

  • First of all, go to the Start menu by pressing the Win key or Windows logo on your keyboard. For Windows 8,  place the mouse cursor in the upper-right corner of the screen and click the magnifying glass icon when it appears.
  • Then type “cmd”. It will bring up the Command Prompt icon.

It will bring up the Command Prompt icon

  • Right-click the Command Prompt icon.
  • Click Run as administrator which is located at the top of the drop-down menu.

With this step you will open a Command Prompt with administrator access. Confirm it by clicking the Yes button when it appears.

You will not be able to run the Command Prompt in administrator mode if you are on a public computer that has access to restrictions, or a networked computer (for example, a library or school computer), or without an administrator account.

Step 2: Change the Directory/ Path in Command Prompt

Once you open Command Prompt, it is a great time for you to change the directory/path/folder in Command Prompt. Here’s how to do it:

  • First, you have to type “cd” in the Command Prompt. Make sure that you enter a space after “cd”. Indeed, this command is used to change the directory as the primary command of all directory changes in Command Prompt. (Don’t press Enter)

First, you have to type cd in the Command Prompt

 

  • Then, determine the address of your destination directory. A directory address is a kind of map to a specific folder. For example, if you wanted to move to the “System32” folder which is in the “WINDOWS” folder on your hard disk, the address would be “C: \ WINDOWS \ System32 \”.

if you wanted to move to the System32 folder which is in the WINDOWS

  • In this step, you can also search for folders by opening My Computer; double-click the hard disk icon, locate the destination folder, then look for the address at the top of the folder.
  • After you determine the destination directory or folder, type the name of the destination folder after “cd”. Make sure to add  a space between “cd” and the name of the destination folder. For example: cd Windows\System32 or cd D:. (Since your computer’s default directory is on your hard disk (for example, “D:”), you do not need to type a hard disk name.)
  • Last, you need to hit Enter. However, this step will change the Command Prompt directory to the directory that you choose.

Here, we assume that you have How-to-Find folder on your Local Disk (D:). Then, you want to change it without first going to Local Disk (D:). Of course, you can move or change How-to-Find folders by skipping extra steps.

Well, once you type “cd” and then “ D: in the Command Prompt, you can continue to type the How-to-Find folder after that command. Here’s the following command that you have to enter:  cd D:/How-To Find. Well, this command will allow you to move or change the directory using Command Prompt.

Method 2: Change the Directory Using the Drag-and-Drop Way

This method is really needed if the folder that you want to open in Command Prompt is seen on the desktop or already open in the File Explorer. If you face it, of course you can change to the directory as quickly as possible by using  the Drag-and-Drop method. To do it:

  • You can tpe “cd” followed by a space in the Command Prompt.
  • Then, you have to drag and drop the folder into the window. Assume that the folder here is named How-to-Find folder.
  • After that, press the Enter.
  • Last, the directory you switched will be reflected in the command line.

Well, the way is a really fast and easy method that you can do to change the directory/path/folder in the Command Prompt.

What is “CD” Command?

You may wonder what the CD command is that you have to type in the Command Prompt when you want to change the directory/path/folder. Here, the CD command stands for Change Directory which is well-known as professional Windows Command Prompt to change the directory command.

Apart from this, you can also change the current working directory in Command Prompt on Windows 10. This command automatically will open different directories or folders on your Windows 10.

What is Command Prompt?

Command Prompt (or more known as CMD) is a command line on Windows which functions to find out the ins and outs of the windows system, where this cmd executes every command given by the user to find out what system is on windows. This command is also to execute the file by writing the command in the cmd window.

Tips in Changing the Directory in Command Prompt

If you are often working with COmmand Prompt, at least there are some tips that can help you for changing the directories in Command Prompt. Here are they:

Using Pushd and Popd commands

The Pushd and Popd commands are similar to the “cd” command. If you want to go back to the directory where it comes from, you definitely can use “popd” command as follow:

C:\Program Files\Microsoft Office> pushd c:\WINDOWS\system32

C:\WINDOWS\system32>

C:\WINDOWS\system32> popd

C:\Program Files\Microsoft Office>

Here, Pushd will remember all the previous directory that you already changed. Using Popd to go back to all the previous folders that you have visited. Let’s see the following command:

C:\WINDOWS\system32\drivers> pushd ..\

C:\WINDOWS\system32> pushd ..

C:\WINDOWS> pushd ..

C:\> pushd “c:\Program Files”

C:\Program Files> popd

C:\> popd

C:\WINDOWS> popd

C:\WINDOWS\system32>

Leave a Reply

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