Open Command Prompt in Folder Using Windows Explorer

Who wants to type out the full path?

The Command Prompt is an incredibly useful way to perform certain tasks. For example, if you want to run a program with special parameters, the Command Prompt is one fast way to do it. The problem is that navigating the directory structure of a modern computer can be a real pain when using Command Prompt. Especially since Windows 10 supports such long folder and program names.

The good news is that you can open Command Prompt directly from inside a Windows Explorer window. Taking you directly to that folder location!

Command Prompt vs PowerShell

One important point about opening the command prompt in a folder, is that we’re referring specifically to the Windows Command Prompt, rather thanPowerShell. Although both programs look similar, being a text-command interface, they are actually very different.

Command Prompt is a simple, lightweight text interface for Windows. In contrast, PowerShell is a complex, powerful command line tool that lets power users do in-depth system management of the computer, among a long list of other handy abilities.

Command Prompt uses the “CMD.exe” while PowerShell uses “powershell.exe”, so they are entirely separate. Although some of the functionality overlaps, the two programs may use different commands to accomplish the same job. This article is only about the Command Prompt, but some of the shortcuts will also work for PowerShell. We’ll indicate when this is the case.

Open Command Prompt Using the Explorer Address Bar

When you open a Windows Explorer folder, you’ll see an address bar similar to that in a web browser. By default, it shows the path of the current folder. You can see it here.

If you click on this address bar, you can type in text. By typing “cmd” and hitting Enter, you’ll open up the command prompt at that location.

This will also work if you type “powershell” instead of “cmd”. Taking you directly to the Windows PowerShell prompt at that folder.

Adding “Open command window here”

In early versions of Windows 10, there was a context menu entry called “Open command window here” which would open the Command Prompt in the folder location you specify. For example, if you right-click on a folder and use this command, the Command Prompt starts at the current folder location.

After the 2017 Creator’s Update for Windows 10, Microsoft removed this option. Why? It’s most likely down to an effort from Microsoft to push people away from using the Command Prompt towards using PowerShell.

Getting this command back is not very difficult, but it does require some tinkering in the Windows Registry. If you don’t feel comfortable doing that, it’s best to skip this method, but if you really want that context menu option back, here’s what to do.

First, click Start and typeregedit.Then click on the regedit program entry.

With the registry editor open, look for the following registry key at this path:

HKEY_CLASSES_ROOTDirectoryshellcmd

This is where things might start to feel a little risky, but we aren’t doing anything that will break your computer. But make sure you follow these exact instructions!

Right-clickon the key and clickPermissionsin the context menu.

In the dialogue box that opens up, clickAdvanced.

At the top of the advanced settings window, you’ll see the listed owner of the key. Click theChangeoption.

Next, type your username and then clickcheck namesto validate it. Then clickOK.

Finally, make sure theReplace owner on subcontainers and objectsbox is selected before clickingOK.

Now we’re back on the permissions page. SelectAdministratorsunderGroup or user namesand selectAllownext toFull control. Then clickOK.

Now we have to restore the context menu entry for the Command Prompt.

Back inside the CMD window, all we have to do is change the “DWORD” from “HideBasedOnVelocityiD” to “ShowBasedOnVelocityId”. Justright-click on it and chooserename,then change the name of the DWORD.

If all has gone as planned, you should now see the “Open command window here” option, when you SHIFT+right-click an item in the Windows Explorer window.

Opening The Command Prompt Using Windows Explorer

This next method of opening the Command Prompt from a Windows Explorer window involves navigating to where the Command Prompt program itself is stored and running it directly from there. This is still useful when, for one reason or another, other means of opening Command Prompt don’t work.

You can find “cmd.exe” in C:WindowsSystem32. If you want to run it with administrative privileges, simply right-click cmd.exe and chooseRun as administrator. There are plenty of commands that require administrative privileges to work and this is one of the ways you can start the Command Prompt with those privileges without leaving Explorer.

You’re In Command Now!

As they;ve done with HyperTerminal, Microsoft may choose to one day completely phase out Command Prompt, in favor of PowerShell. While that’s not a bad thing in itself, PowerShell could do with some polish to help non-power users who would have been fine with the Command Prompt to use common functions just as easily. Still, until the day Command Prompt actually does go the way of the Dodo, you can rest assured it’s only a few clicks away.

If you need to improve your Command Prompt skills, then why not check out these21 commandsthat every Windows user should know. You’ll be flying through tasks in no time armed with these incredibly useful tricks.

Sydney Butler is a social scientist and technology fanatic who tries to understand how people and technology coexist. He has two decades of experience as a freelance computer technician and more than a decade as a technologies researcher and instructor. Sydney has been a professional technology writer for more than five years and covers topics such as VR, Gaming, Cyber security and Transhumanism.Read Sydney’s Full Bio

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved