Use this keyboard shortcut: Shift + Menu, W, Enter
Shift + Menu (alternatively, Shift + F10), (opens extended right-click menu in current folder)
W (selects "Open Command Window Here"),
- Enter (activates selection; required since "New" is also selectable with W)
The Menu key refers to the special key introduced by Microsoft, usually to the right of the right Win key.
This shortcut is available on a default installation of Windows (7) without any 3rd party software.
The AHK way. You just need to press Win + C (or whatever you want to define it as.):
SetTitleMatchMode RegEx
return
; Stuff to do when Windows Explorer is open
;
#IfWinActive ahk_class ExploreWClass|CabinetWClass
; create new text file
;
#t::Send !fwt
; open 'cmd' in the current directory
;
#c::
OpenCmdInCurrent()
return
#IfWinActive
; Opens the command shell 'cmd' in the directory browsed in Explorer.
; Note: expecting to be run when the active window is Explorer.
;
OpenCmdInCurrent()
{
; This is required to get the full path of the file from the address bar
WinGetText, full_path, A
; Split on newline (`n)
StringSplit, word_array, full_path, `n
; Find and take the element from the array that contains address
Loop, %word_array0%
{
IfInString, word_array%A_Index%, Address
{
full_path := word_array%A_Index%
break
}
}
; strip to bare address
full_path := RegExReplace(full_path, "^Address: ", "")
; Just in case - remove all carriage returns (`r)
StringReplace, full_path, full_path, `r, , all
IfInString full_path, \
{
Run, cmd /K cd /D "%full_path%"
}
else
{
Run, cmd /K cd /D "C:\ "
}
}
As a bonus, the script above also creates a new text file with this shortcut: Win + T
Credit to: Eli Bendersky
One solution -- Type search phrase into task bar and arrow down to the appropriate entry. Then press the (context) menu key, and "i" for the "Open file location" entry. This isn't as good as a shortcut, but may be as good as it gets.
Best Answer
Another Default All Keyboard Method
Once in the current folder with Windows Explorer, press ALT+D, type in
CMD
and press EnterCAUTION: Issues with ALT + F + P (and other methods)
The This PC, Quick Access, and other special views in File Explorer is the real issue
It seems if you open Windows Explorer\File Explorer and by default it opens This PC then the Open command prompt option is grayed out and actually pressing the P key at this point does nothing if this is the case. This seems to be an issue for other File Explorer special views as well such as Quick Access.
When pressing ALT+D, typing in
CMD
and pressed Enter when on This PC (and Quick Access) via File Explorer, it opens up the command prompt in theC:\WINDOWS\system32
directory.