84

When I'm working in a folder in Windows Explorer, sometimes I have a need to run some CMD command in this folder.

How do I open the command line from a current folder, so the console opens in the current directory?

Example:

I work in D:\Apps\Test. I would like to have a possibility to open a command prompt with the same context (meaning: D:\Apps\Test), so I don't have to navigate to this folder again within a console, ie. so it opens cd'd to the current location.

EDIT: The solutions from this topic do not work for me, what's why I asked a separate question.

ᔕᖺᘎᕊ
  • 6,393

9 Answers9

231

Enter cmd in explorer's address bar & press enter

enter image description here

clhy
  • 6,514
133

You can also shift-right-click in a folder, and notice a new entry in the context menu (Open command window here):

http://i.imgur.com/nbfURik.png

Seiyria
  • 1,728
40

How do I open Windows CMD in explorer from the current folder?

Enter cmd in the explorer address bar and press Enter

enter image description here

DavidPostill
  • 162,382
17

Hold down shift while right-clicking anywhere in the folder. You will be presented with an option to "Open Command Window Here".

You can also shift + right click on any sub folder and open a command window there as well.

12

If you're a GUI kind of person, holding Shift during right-click makes "Open command window here" appear in the context menu. You can try it on current or nested folders.

insider
  • 121
10

I use the ContextConsole Shell Extension. When you make a right click you get an option to run a command prompt and run a command prompt as admin (elevated) to do system tasks.

enter image description here

4

If you don't mind using third-party extensions, the free ClassicShell allows adding a custom toolbar to Windows Explorer.

Example of custom toolbar

The image shows the configuration that I currently use. The button on the far right opens a console window to the current folder. This is how you can get it.

  • Install the Classic Explorer part of ClassicShell
  • Open a new Explorer window. You should now see an additional toolbar right below the address bar.
  • Right-Click into the toolbar and select 'Classic Explorer Settings'
  • In the opening dialog window, check the 'Show all settings' checkbox.
  • Go to the 'Toolbar Buttons' tab to configure the layout of the custom toolbar. Feel free to throw out any buttons that you don't like.
  • Add a 'Custom' button from the list on the right. Double-click the newly added button in the list on the left and enter cmd in the 'Command' field.

I am usually not a big fan of third-party extensions, but I found this one to be very useful, especially for this particular use case.

ComicSansMS
  • 364
  • 2
  • 10
3

While at the explorer, in the bar at the top there is a file menu where you have the option to open the command window for the current directory. This work in Windows 8. (In Windows 7 hold down the shift key when you click the File menu).

Ed_
  • 376
0

Note that - if you want a static icon on the desktop that opens the CMD prompt at a certain folder location - you can also do the following:

  1. Create a shortcut on the desktop to CMD.EXE
  2. Right-click the shortcut and go into Properties
  3. On the Shortcut tab, put your desired location in the "Start In" field.

Obviously, this only works from the icon and always opens the same location. The other answers are a better way of opening the prompt to whatever your current folder is (dynamically).

Omegacron
  • 397