How to navigate folders in Windows Command Prompt
When you want to modify the properties of a specific file, scan a specific folder, or perform any other action in Command Prompt, you must first navigate to that folder. Luckily, navigating through folders in Windows Command Prompt is simple when you have a few commands at hand.
Open Command Prompt with admin rights
First, open Command Prompt with admin rights. This step is very important; otherwise, Windows may not allow you to switch folders in some cases. To do this, type "Command Prompt" in Windows Search, right-click Command Prompt, and select Run as administrator. If prompted by the UAC window, click Yes.
This action will launch a Command Prompt window with admin rights, giving you access to execute administrative tasks without restrictions. Be careful with admin rights, because you're more likely to cause problems if you make a mistake.
Commands to navigate through folders in Command Prompt
To move back and forth between folders in Command Prompt, you need to be familiar with two main commands:
- Change directory: cd
- Directory listing: dir
The dir command will give you a list of available directories you can enter, while the cd command will take you to the directory you want. If you know the name of the folder you want to navigate to, type it after "cd" to move there (such as "cd downloads"). If you want to go back to the previous directory, add two dots next to the "cd" command. Like this: "cd."
Tip: You only need to list folders when you're not sure where to navigate. If you already know the directory name, there is no need to use the "dir" command.
How to use "cd" and "dir" commands in Command Prompt
Let's take a closer look at how you can navigate folders in Command Prompt using the "cd" and "dir" commands through an example.
Suppose you want to navigate from the starting point (C:Windowssystem32) to the Downloads folder (C:UsersDownloads).
First you need to go back to drive C:. To do that, use the "cd." command twice to navigate out of the System32 and Windows folders, returning you to the root folder.
Now, if you're not sure about the exact name of the first directory to navigate to, you can list the available directories to find the correct one - enter "dir" to display the list.
Know that you need to go to the Users folder, type "cd Users" and you will be redirected to C:Users. From there, you can continue to the next two directories using the "cd" command like this:
cd cd Downloads
Note that your system will not have the ehtas directory shown above; That username is unique to the example system. You will enter your username there.
2 commands for easy folder navigation in Command Prompt
In addition to the commands reviewed, a few additional commands will make navigating folders in the Command Prompt easier:
1. You can use the "cd" command to return to the root directory of the current drive. For example, if you are in the C:WindowsSystem32AppLocker folder and want to go directly back to the main C: drive, enter this command and press Enter.
2. Similarly, to convert drives from the root folder (or any other folder), enter the drive letter followed by a colon, such as "S:".
How to open Command Prompt in a specific folder from File Explorer
Opening a CMD window from File Explorer eliminates the need to navigate back and forth between folders using various commands in Command Prompt.
Open File Explorer by clicking the folder icon on the taskbar. Navigate to the folder you want to access in Command Prompt. Type "cmd" in the address bar and press Enter. This action will open Command Prompt in the current directory.
Navigating the Command Prompt may not be easy and it certainly takes some getting used to. But once you master the navigation commands, you'll be able to quickly browse folders on your computer with ease.
You should read it
- How to Navigate the Windows Directory
- Secure folders with Secure Folders software
- Delete all empty folders on Android with just one touch
- Guide to lock, hide and secure files and folders with Hide Folders software
- Hide and protect folders on Windows
- How to Archive Folders
- How to set password protection folder on Mac
- 7 small tips with folders in Windows
- How to bookmark folders on Windows 10
- Navigate directly from table to table in Word 2013
- Steps to create multiple folders at once on Windows 10
- How to Access Public Folders in Outlook 2016 on PC or Mac
Maybe you are interested
How to use the file search command on Windows, find saved files
Why is tldr command better than man command in Linux?
Should I use PowerShell or Command Prompt?
What to do when open command window here does not appear?
How to switch users on the Linux command line
How to fix Mac Homebrew error 'zsh: command not found: brew'