osama7901
osama7901

Reputation: 1661

Is there a way to open command prompt in current folder?

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?

Upvotes: 41

Views: 64669

Answers (8)

11 Ian
11 Ian

Reputation: 1

press Shift + end combined with ctrl + c

Upvotes: 0

Heri
Heri

Reputation: 4578

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

Upvotes: 1

Md Moaz Shamim
Md Moaz Shamim

Reputation: 41

Type cmd command in address bar where path or location of the file or folder is shown.

Upvotes: 4

Bernhard
Bernhard

Reputation: 2799

use the description in https://stackoverflow.com/a/34534874/1498669 and put "run as administrator" checkbox on

  1. Open 'File Explorer' and enter "shell:sendto" in location bar + hit return to get into this folder
  2. Right mouse click and create a "New"->"Shortcut", put cmd.exe into the path, done
  3. Edit the properties of the shortcut and edit the target to "%windir%\system32\cmd.exe /k pushd"
  4. 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.

Upvotes: 3

KUTlime
KUTlime

Reputation: 7977

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.

Upvotes: 4

datkom
datkom

Reputation: 1762

Just go to your folder location and type "cmd" on the address bar.

Upvotes: 153

Nurjan
Nurjan

Reputation: 6053

Press Shift + Menu, then choose Open Command Window Here. It works.

Upvotes: 9

Skycc
Skycc

Reputation: 3555

In win7/8, try right click while holding shift key, should have cmd prompt here

Upvotes: 3

Related Questions