How to open a terminal quickly from a file explorer at a folder in Windows 7?

40

13

This can be done easily in Ubuntu, just right click and open Terminal. It is very inconvenient to open cmd.exe then cd to the folder.

So, how do I open a terminal quickly from a file explorer at a folder?

Catherine

Posted 2011-09-26T14:56:21.037

Reputation: 403

@grwawity Not a duplicate: the linked question restrict to the the Context Menu, while this one is open to any other method. E.g. another solution is to type "cmd" to location bar. I'd like to add it as answer but cannot because this question is marked as duplicate… – Franck Dernoncourt – 2015-07-14T17:18:36.247

Answers

87

  1. Hold Shift + Right Click the folder you want it opened on, and click "open command window here". That should do the trick!

OR

  1. You can also type cmd into the Windows File Explorer address bar (use Ctrl+L to focus the address bar) and press Enter to open the shell.

sofly

Posted 2011-09-26T14:56:21.037

Reputation: 1 006

8

You can type cmd in Windows Explorer's location bar (which you can edit with the keyboard shortcut Alt+D); it will open a terminal upon pressing Enter.


Personally I use a voice command in Dragon NaturallySpeaking that takes care of it:

enter image description here

Code:

Sub Main
    SendKeys "%d"
    Wait(0.1)
    SendKeys "cmd"
    Wait(0.1)
    SendKeys "{ENTER}"
End Sub

Franck Dernoncourt

Posted 2011-09-26T14:56:21.037

Reputation: 13 518

Is CTRL-D the correct combination to edit the address bar in Explorer, or is it ALT-D? – music2myear – 2018-05-18T15:19:55.373

@music2myear ALT-D – Franck Dernoncourt – 2018-05-18T20:45:25.527

4

Press Ctrl+L. This will allow you to edit the location bar address of the file explorer. Type 'cmd' and press enter. This will open command prompt in current folder.

Nachiket Saggam

Posted 2011-09-26T14:56:21.037

Reputation: 41

2Probably need to clarify this needs done from Windows/File Explorer, which versions of Windows it works with, and confirm none of the existing answers contain this already. – Pimp Juice IT – 2017-09-03T13:47:35.510

I think this is the best answer about open terminal for current folder path – JackWu – 2018-09-10T03:50:49.663

0

You can use Andrew Richards' Enhancing the “Open Command Prompt here” Context Menu experience tweak

run cmd elevated

run powershell elevated

Just import the below *.reg file (or copy from the MSDN blog above)

Windows Registry Editor Version 5.00

; Command Prompt

[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"

[HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open]
"MUIVerb"="Command Prompt"
"Icon"="cmd.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas]
"MUIVerb"="Command Prompt Elevated"
"Icon"="cmd.exe"
"HasLUAShield"=""

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


; PowerShell

[HKEY_CLASSES_ROOT\Directory\shell\02MenuPowerShell]
"MUIVerb"="PowerShell Prompts"
"Icon"="powershell.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"

[HKEY_CLASSES_ROOT\Directory\background\shell\02MenuPowerShell]
"MUIVerb"="PowerShell Prompts"
"Icon"="powershell.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuPowerShell"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open]
"MUIVerb"="PowerShell"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\command]
@="powershell.exe -noexit -command Set-Location '%V'"

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas]
"MUIVerb"="PowerShell Elevated"
"Icon"="powershell.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\command]
@="powershell.exe -noexit -command Set-Location '%V'"


; Ensure OS Entries are on the Extended Menu (Shift-Right Click)

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\background\shell\cmd]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\shell\Powershell]
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell]
"Extended"=""

phuclv

Posted 2011-09-26T14:56:21.037

Reputation: 14 930

0

As I don't have access to any Win7 machine right now i'll give you 2 answers, one that I know that works in winXP and one that I found but don't know if it works in Win7.

Jamiro14

Posted 2011-09-26T14:56:21.037

Reputation: 161

-1

For Mac:

Head into System Preferences and select Keyboard > Shortcuts > Services. Find "New Terminal at Folder" in the settings and click the box. Now, when you're in Finder, just right-click a folder and you're shown the open to open Terminal.

source: https://lifehacker.com/launch-an-os-x-terminal-window-from-a-specific-folder-1466745514

threadpool

Posted 2011-09-26T14:56:21.037

Reputation: 99

1Welcome to [SU], and thanks for contributing to our knowledge base!   Unfortunately, this question is about Windows, and so your answer is at risk of being deleted.   I suggest that you (1) search our site to see whether this information is already available (and findable), and, if it isn’t, (2) post (ask) a new question, that is the same as this question, but for Mac, and then (3) post this answer there.   (This is absolutely allowed and encouraged.   High-rep users can do steps 2 and 3 simultaneously.   Since you’re a new user, … (Cont’d) – Scott – 2018-11-12T00:33:11.253

(Cont’d) …  the system may force you to wait a few minutes (or hours?) between steps 2 and 3.)  … … … … … … … … … … P.S. Thanks for providing the information and linking to the source. – Scott – 2018-11-12T00:33:13.483