I have a project folder somewhere, and many times I need to open command prompt (on windows 7/8.1/10) and cd to that folder. It would be very handy if there's an option right click > open cmd here. is there a tool for that?
Just go to your folder location and type "cmd" on the address bar.
Alt + D
to switch focus to the address bar. –
Strictly Press Shift + Menu
, then choose Open Command Window Here
. It works.
How about to use the PowerShell OpenHere
module?
Run PowerShell with elevated permissions and type:
Install-Module OpenHere; Import-Module OpenHere
Set-OpenHereShortcut -ShortcutType:WindowsPowerShell
Disclaimer:
I'm a developer of this module.
Type cmd command in address bar where path or location of the file or folder is shown.
In win7/8, try right click while holding shift key, should have cmd prompt here
use the description in https://mcmap.net/q/80474/-how-can-i-open-a-cmd-window-in-a-specific-location and put "run as administrator" checkbox on
- Open 'File Explorer' and enter "shell:sendto" in location bar + hit return to get into this folder
- Right mouse click and create a "New"->"Shortcut", put cmd.exe into the path, done
- Edit the properties of the shortcut and edit the target to "%windir%\system32\cmd.exe /k pushd"
- you can also create a copy of that shortcut, rename it to cmd.exe_admin, select properties, hit button "Advanced" an select the checkbox "run as Administrator"
Now use the "SendTo"-submenu in the explorer right click context menu to send any filepath or folder into the normal or elevated commandbox.
This "shell:sendto"-trick is also very useful for eg. Notepad++ or any program you want to start in "elevated" mode.
You can add an own context menu point in your explorer by adding a new entry in your registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\cmdPromptHere]
@="Open command prompt here"
[HKEY_CLASSES_ROOT\Directory\shell\cmdPromptHere\command]
@="cmd.exe /s /k pushd \"%V\""
The default string value in the root key cmdPromptHere defines the displayed string in the context menu. Without this default value the displayed string equals the chosen reg key itself ("cmdPromptHere").
This new context menu is displayed on any folder node in the explorer.
If you do not want to edit the registry manually, copy above code to a text file with suffix ".reg" and double click that file in the explorer.
Works in Windows 10
© 2022 - 2024 — McMap. All rights reserved.