Can I add a Windows Explorer context menu option to start command prompt in the selected directory?
When browsing in Windows Explorer, sometimes I want to start a command prompt "here", e.g. with the current browsed folder as the current directory.
For example, when I am browsing "D:\Foo\Bar\Bar1", I want to open the command prompt with current dir pointing to this directory. Normally what I do is
- Copy the current folder path from Windows explorer's address bar
- Open cmd via Start Menu > Run
- Type D: (because I have to change drive, the default is C:)
- Type "cd " and then paste the folder path that I copied earlier
I do it quite often in my daily work, and I think by adding a context menu I will improve my efficiency (and also having to do the above repeatedly can be kind of annoying). I imagine I can just Right-Click > Start cmd here and then I will have a command prompt already in D:\Foo\Bar\Bar1
Is this possible?
Solution 1:
Start / Run / regedit
-
Navigate to the following keys in turn:
HKEY_CLASSES_ROOT\Drive\shell\cmd HKEY_CLASSES_ROOT\Directory\shell\cmd HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
-
Under each in the right pane you'll see a REG_SZ string value called Extended. Just rename this to something else (in case you want to easily undo the change) or delete it (just that value):
Now you can simply right-click a drive or directory and have the Command Prompt option show up without having to press Shift.
Solution 2:
Right-click on the folder itself with Shift held down, and a new context item should appear named Open command window here.
This trick also works if you do it in the empty space of a folder.
Solution 3:
Just type "cmd" in Windows Explorer's address bar.
Solution 4:
A fast alternative on Windows 10 is to hit Alt, D, E in succession and the command prompt will open on the current open Explorer path. Sorry for the german, but you get the point.
Alt, D shows you this menu