- 4 Ways To Open Command Prompt Window in a Folder In Windows 10
- Add Open Command Window Here to the context menu using Registry Editor
- Add Open Command Window Here using the REG file
- Open Command Prompt In A Folder Using Keyboard Shortcut?
- Using CMD command in File Explorer to open Command Prompt Window
- Add “Open Command Window Here” with Administrative privileges in the context menu
- How to get back Command Prompt in Win+X menu?
- Ways to open Command Prompt in a folder in Windows 10
- Open a command prompt window in any folder
- 1] Hold down the Shift key and use the context menu
- 2] Type CMD in the address bar
- Find and Open Files Using Command Prompt in Windows 10
- Opening Command Prompt
- Search for your files
- Change Command Prompt Directories for Precise File Location
- Open your Files in Windows 10 Command Prompt
- Wrapping Up
4 Ways To Open Command Prompt Window in a Folder In Windows 10
When you open the command prompt by going to Run –> cmd, you will notice that by default, it opens in the user profile directory path. Sometimes, the user needs to open the command windows with the currently opened folder path. This article explains the exact scenario.
Command Prompt is the command-line which enables users to execute different programs and commands. Microsoft is slowly removing command prompt support from all its major Windows platforms. PowerShell is the alternative to Command Prompt which supports almost all the commands of DOS and much more. Some users still insist on using Command Prompt instead of PowerShell.
If the program you want to run in Command Prompt is not listed in the PATH variable, the Command Prompt will give you an error that it could not find the executable file. For this, we need to manually go to the folder where that particular program is located. One way of doing this is to type in the complete path of the file. Another way is to directly open the command prompt windows inside the folder. The second approach is more visual and easy to implement.
Pro Tip: If you are using Windows 10, just open the folder and go to File menu –> Open Windows PowerShell. You also have the option to open Windows PowerShell as Administrator.
In this article, we will discuss different techniques by which we can open command windows in a folder, the most popular being “Open Command Windows Here” context menu item. Let’s start.
Add Open Command Window Here to the context menu using Registry Editor
- Click Windows + R then type regedit. This will open Windows Registry editor.
- Registry editor window will open. After that go to HKEY_CLASSES_ROOT. Further go into Directory\shell\cmd
- and right click Permissions. The following window will appear.
- Then click on the Advanced option.
- After that, click on change at the top of the window
- Type your username in “Enter the object name to select” and then click on the check name to validate that name.
- Press Apply and then OK. When you are done with those Administrative modes in Group or user names of permissions for cmd window and tick Allow on Full control. Click Apply and then OK
- Once you are done with it, click on HideBasedonVelocityID and rename it ShowBasedonVelocityId
- Now when you click the Shift key and right click you will see the option “Open Command Window here“
This will permanently add “Open Command Window here” to the Windows Context menu. After editing the Registry, you will be able to open the command prompt by right clicking inside any folder and selecting “Open Command Window Here”.
Add Open Command Window Here using the REG file
This is basically the same method listed above. For your ease, we have created a REG file for all the actions mentioned above. You just have to download and run the REG file. It will automatically add the desired values inside the Windows Registry.
If the value does not come after running this file, please try restarting Windows Explorer or the computer.
Open Command Prompt In A Folder Using Keyboard Shortcut?
If you are in a hurry then this is the easiest method of opening Command Prompt inside the folder. Just follow the steps below:
- Go to the required folder.
- The press Shift + right click mouse button anywhere in the folder window.
- Select the “Open command window here” option from the context menu.
Using CMD command in File Explorer to open Command Prompt Window
You can open a command prompt in any of your desired folder by using the file explorer location bar.
- Go to your desired folder and click on the location bar of Windows Explorer.
- Then type cmd and press Enter key.
- The command prompt will be opened in the folder.
One drawback of this technique is that it will open the command prompt in the regular user privilege mode and not in the administrative mode. To open it in administrative mode:
Select Windows + R and type cmd.
Click Ctrl+Shift+Enter instead of just hitting enter to open the Command Prompt in administrative mode.
You can also open PowerShell window using the same technique. Just go to the folder and then type powershell in the File Explorer address bar. This will open PowerShell in the same folder location or path.
Add “Open Command Window Here” with Administrative privileges in the context menu
In order to “open Command Window here ” with administrative privileges you can download the following file.
This will add a context menu option for the admin command prompt.
How to get back Command Prompt in Win+X menu?
In order to change the Windows Powershell options with Command Prompt go to Settings –> Personalization –> Taskbar. After that turn off the option of “Replace Command Prompt with Windows Powershell Option in the menu when i right click the start button or press Windows key +X”.
The Command Prompt still remains an important part of Windows Operating System and using the methods discussed above, you will be able to make productive use of your time by using shortcuts. What is your favorite method of running command prompt without typing in the folder paths?
Ways to open Command Prompt in a folder in Windows 10
The Command Prompt is a feature of Windows that lets you execute MS-DOS and other computer commands and perform tasks on your computer without using the Windows graphical interface. There are various ways how you can launch Command Prompt windows.
Open a command prompt window in any folder
In this post, we will see two very simple ways to open a command prompt window in any folder or on the desktop, without having to navigate the menu. The first is using the context menu.
1] Hold down the Shift key and use the context menu
UPDATE: Windows 10 has now replaced Open command window here with Open PowerShell window here. But with a registry tweak, you can restore Open command window here item to Windows 10 folder context menu.
To open a command prompt window in any folder, simply hold down the Shift key and right-click on the desktop. In the context menu, you will see the option to Open command window here. Clicking on it will open a CMD window.
You can also do the same inside any folder. The prompt takes the path of the folder from where it is opened.
2] Type CMD in the address bar
There is another trick to do the same thing. navigate to the folder and then simply type CMD in the address bar and hit Enter to open the command prompt window there.
You will see the CMD taking the path of this folder.
Speaking of the command prompt, there are several Command Prompt tricks you may not know, including how to open an elevated command prompt using a CMD. Check them out!
Date: April 8, 2020 Tags: CMD, Context Menu
Find and Open Files Using Command Prompt in Windows 10
Do you ever drive yourself crazy looking for all the files you need for a project? Have you saved them in unknown places on your computer? Can you only remember part of the name you gave the file? If any of these apply to you, using the command prompt instead of Windows Explorer may help you quickly find the files you need and allow you to open them directly from that location.
We have to mention, though, that it’s a waste of time using the Command prompt to open simple, trivial files. However, this method is something you should definitely look at when dealing with multiple files and assorted file types in random folders.
Opening Command Prompt
To search for the files you want, first launch Command Prompt. There are several ways to do this.
- Type cmd in the Windows search box, then click on the icon to open the window. It’s preferred to run the command prompt as an administrator.
- Use the Run window. A fast way to launch this window is to press the Win + R keys on your keyboard. Then, type cmd or cmd.exe and press Enter or click OK.
- Use Cortana if it works for you properly: as soon as you see the Cortana is “listening” text, say “open command prompt,” and it will open up.
Search for your files
In the command prompt, type dir «\search term*» /s , but replace the words “search term” with text you want to find by using the file name. In the following screen, we are trying to search for a folder/file named “movies.”
The correct file path can be easily identified by the size of the folder. Once you have typed in the command, press Enter, and the search begins. It may look like nothing is happening for a second or two, though. But soon all the file paths mentioning the correct file or folder will be identified and named.
What do all the terms in the command mean?
- dir is a command used to show files in the current directory but which can also locate data anywhere in the system.
- The backslash tells dir to search from the root directory of the current drive.
- /s tells dir to search all subdirectories.
- Finally, * is used by command-line apps as a wildcard. It indicates that the search will locate all file names that contain your search term.
- Putting an asterisk at the end of the name, like business* , will find all the files with your search term at the beginning of the name.
- If you put it at the beginning, then your search will include only results with your text at the end. For example, *.jpg .
- If you put an asterisk at each end of the search term, you will cover all the bases. No matter where your text is in the actual name of the file, that file will be listed in the results.
Change Command Prompt Directories for Precise File Location
If your target file is located in D: drive, you won’t find it anywhere in the Windows folder from the C: drive. Therefore, you should learn to change the drive path as shown below.
First, type cd.. , which will enable you to easily move one folder up. To go to D drive, just type d: , and the command prompt will now listen to the new drive.
Within the destination drive, you can search for the correct file once again using the dir «\search term*» /s command discussed in the previous section. Do take care to use the * wildcard, both at the beginning and end of the search term for a comprehensive search – especially if that folder has hundreds of files. It’s pretty common to make mistakes in the wildcards and backslash, which returns a “no label” error as shown below. If you type correctly, you will easily identify the folder path and the correct file name.
If the folder path is very long, you may want to copy-paste the entire thing. We have a detailed tutorial on how to cut-copy-paste in the Windows 10 command prompt. But the method is simple enough: use Ctrl + A to select the entire command prompt screen, then just release the mouse or trackpad click. This would make any part of the command screen selectable for a copy-paste action as shown below.
Open your Files in Windows 10 Command Prompt
Once you find the file you want to open, you can open it from this screen using its default program, without locating it in your file explorer.
First, change the directory to the immediate folder where the file is located. This can be done using cd followed by the entire folder path to the correct file. It’s common to make mistakes, so it’s better to copy-paste the entire folder path as discussed in the previous section. Once the correct directory menu has been opened, you can open any files there. Here it’s a folder, where I saved my personal collection of rented movies.
Enter the file name inside the quotation marks «..» as shown here. Press Enter and the file will open using its default application. Here it’s Movies and TV programs, which is set as my default application for .mp4 files.
The file, a Mel Gibson-led movie called “Get the Gringo,” opens from the command prompt.
You can open multiple files from the command prompt once you’ve opened the correct folder. Here we open another file called “Erin Brockovich.mp4” in the same folder.
The file, a Julia Roberts-led movie called “Erin Brockovich,” opens from the command prompt using the default app.
Once you’re done, you may want to move back to another folder in the command prompt. For this, use cd.. followed by a new drive name as shown below. Navigating your computer’s files using the command prompt is very similar to just doing it in a regular way from your File explorer.
Wrapping Up
If you are looking for all your files concerning one topic or just trying to find the one that is hiding among all the folders in your computer, try using the command prompt. It may make it more efficient for you.
Amazingly, the command prompt is way faster and more responsive than opening the files from the File Explorer. This is true for video files, Windows Photos, Word documents, and heavy-duty games. The reason for this is that the GUI always consumes more memory and slows down the processes.
Related:
Sayak Boral is a technology writer with over ten years of experience working in different industries including semiconductors, IoT, enterprise IT, telecommunications OSS/BSS, and network security. He has been writing for MakeTechEasier on a wide range of technical topics including Windows, Android, Internet, Hardware Guides, Browsers, Software Tools, and Product Reviews.