Open Specific Location path in cmd

How to Open Specific Folder path in cmd on Windows 11/10?

In Windows, you can run or open any program using the command prompt, before opening any program using the command prompt you need to navigate to the specific path in the cmd. Or you need to add that particular program path to the environmental variables. In cmd, you can navigate to any folder location using the cd command but doing this all the time is very difficult and time-consuming. Instead of this, you can easily open the specific folder path in cmd using the following method. This method is very easy to follow.

Open Specific folder path in cmd on Windows 11/10:

Using the following methods you can open any specific file/folder location in cmd, you no need to use the cd command to navigate to the folder path.

Method 1: Using the File Explorer:

First, navigate to the Program installer using the File Explorer, for example, I want to open the SSH folder location in cmd. So I opened that SSH folder in File Explorer.

folder location

Now click on the address bar and delete the path and type cmd in the address bar.

Type cmd

Next immediately command prompt will open that folder path, and you can see the cmd already navigated to that specific path.

Open Specific Folder path in cmd using file explorer

This is a very easy method, but if you want to open the same path using command prompt admin then follow the next method.

Method 2: Adding Cmd admin in Right-click context menu:

Note: Modifying the Registry is risky, and it causes irreversible damage to your OS Installation Follow the steps correctly. Friendly advice Before Modifying Registry Creating Restore Point is recommended.

In this method we are going to add the command prompt (Admin) to the right-click context menu, so you can right-click on any folder and open that folder path in cmd admin. For this, we are going to add the registry file, follow the below-mentioned steps.

Open Notepad and copy-paste the following code.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\background\shell\runas]
@="Admin Command Here"
"NoWorkingDirectory"=""
"HasLUAShield"=""
"Position"="Top"
"Icon"="C:\\\\Windows\\\\System32\\\\cmd.exe"

[HKEY_CLASSES_ROOT\Directory\background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

Now save the file as CmdAdmin.bat in any location, I saved it on the desktop.

Double click on the file to merge, you’ll get one confirmation pop-up, click on Yes to confirm.

Next, restart the system once and after the restart, just right-click on any folder you’ll see the Admin Command Here option.

Open Specific Folder path in cmd

Click on that option to access that folder location path in cmd admin. That’s it.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top