Dear followers of Get-ITsolutions.com, in our today guide we will show you how can change directories in Command Prompt by leveraging the various features. There are a few methods of how you can do this, so we’ll walk you through them.
Note: Command Prompt is not case sensitive, meaning that you can type commands using capital letters, lowercase, or any combination of them. The commands CD, cd or Cd, all work the same way.
Method 1 – Change Directories in Command Prompt using the Drag-and-Drop Method
The first command from the list is CD (Change Directory). This command enables you to change the current directory or, in other words, to navigate to another folder from your PC.
- Open Start.
- Type “cmd” in the Windows Search bar to open Command Prompt
- Right-click the top result, and select the Run as administrator
- Type cd followed by a space, drag and drop the folder you want to open in Command Prompt, and then press Enter.
- In this order, you can quickly change to that directory.
Method 2 – Change Directories in Command Prompt
The first method will not always work so we have a second method to use in order to change directories.
- Open Start.
- Type “cmd” in the Windows Search bar to open Command Prompt
- Right-click the top result, and select the Run as administrator
Tip: If you want to be a bit more efficient with your directory changes, type cd on the command line, followed by the first few letters of the directory you want. Then, press Tab to autocomplete the directory name. Or you can type cd, followed by the first letter of the directory, and then press Tab multiple times until the correct directory appears.
So, let’s say we’re currently in “C:\WINDOWS\system32” folder and want to go to the “GetITSolutions” folder, which is nested in “D Drive” Inside “Test” folder. If we try to jump straight to “GetITSolutions” without first going to “D Drive,” we get the error shown in the image below.
Let’s take things one directory at a time, for now. As we mentioned previously, we’re currently in our “C:\WINDOWS\system32” folder. We type the following commands in Command Prompt to visit “D drive
cd D:\Test D:
We’re now in the “D:\Test” folder. To move down another level, we type cd on the command line followed by the name of that directory and press Enter:
If you ever go to the wrong directory and want to turn back, type the following command. This allows us to move up a level.
cd . .
How to list Directory in Command Prompt
You can view the contents of a folder by using a command called DIR. This will give you a hint as to which directory to navigate to next. In order to give an example to you, we have created a folder named Test on the D: drive, with several files. You can see them in the screenshot below.
To navigate to the folder mentioned above, using the following commands:
cd D:\Test D:
To view the contents of the folder, type DIR, and press Enter. The list of the files and folders contained by it is displayed, together with some details about each of them (the size and the date and time when they were last modified).
Conclusions
In our today’s guide, we covered two different ways on how how to Change Directories in Command Prompt. We hope you found this guide helpful. Please follow us for more tips.