Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to right click on a folder called (C:\myFolder) and have a command prompt open like this...

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.


Is this possible?

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, Tog, Kevin Panko, Dave, random Feb 28 '14 at 17:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

besides the great answer, a workaroudn alternative solution is opening a cmd prompt and typing CD (that's C,D,space) dragging the folder to it and hitting ENTER. but the shift-right click makes more sense. and I suppose amending it so it's in the right click menu withoutt shift is even better. – barlop Feb 27 '14 at 23:26
IMHO, This question is a lot more succinct and to the point. The older previous question is better candidate to be treated as duplicate. – LMSingh Feb 28 '14 at 22:08

How to open a command prompt from Windows Explorer

In previous versions of Windows like XP/2000 you needed to run TweakUI to get that from the context menu.

However since Windows 7 and 8 you simply hold Shift key when you right-click.

enter image description here

Its easy to hold Shift key when you right-click and you will have the open command window here.

enter image description here

There are numerous posts online regarding how to insert this same functionality into the default right-click context menu with registry hacks and all kinds of nonsense that will allow you to do this without the need to Shift.

I just use the shift + right click trick and move on with my life. I'd advise most end users to stay out of the registry unless they know what they're doing.

Check out this techrepublic article.

share|improve this answer
Some other also only shows up when holding shift, like "Run As..." (if I recall correctly). – Alvin Wong Feb 28 '14 at 14:54
When doing customer support for people that have Cerebral Palsy and other ailments, we had to learn how to do this in Windows as not everybody can use a mouse. Open Windows Explorer using either CTRL+ESC or the Windows Key.. Navigate to locate Windows Explorer.. Open the subfolders with your space bar.. Once Windows Explorer is located, Click the TAB key until you get to the correct folder.. Press SHIFT+F10 to right-click on the folder.. Move your arrow up or down and press ENTER to start.. – Leptonator Mar 2 '14 at 5:39

Shift-click works only on folders and answers the original question. However you can have the same effect even on files in all versions of Windows (NT,2000,XP and later). I've used this solution on folders and files in explorer. More importantly, it even works inside of File Selection dialogs; anywhere a windows file context menu can come up. It also does not require a registry change.

In your "SendTo" folder you can either make a batch file called "LaunchCMDAtThisFileOrFolder.Bat". The location of "SendTo" is different by Windows version. See this for XP and this for Vista & 7, 8 or this. If you like code then this might be interesting

The batch file will have the following code.

@Echo off
CD %~dp1

Now you can right-click any file and "Send To" -> "LaunchCMDAtThisFileOrFolder".

Here's an example of a Standard Windows Dialog where you can use this. Note, the context menu is on a file, not a folder as it works on both.

Here's an example of a Standard Windows Dialog where I can use this. Note, the context menu is on a file, not a folder as it works on both.

Here's an example of a Non Standard Windows File Listing where this can be used.

Here's an example of a Non Standard Windows File Listing where this can be used.

CMD Prompt opened at the folder of the "SendTo" target.

How the batch file works.. Reference Windows command line help, specifically the FOR command

%~d1 translates to drive letter of the first parameter to the batch file.
CD %~dp1 translates to CD "path of the first parameter".
CMD /K runs the CMD.exe. The /K parameter is needed inside a batch file specifically, otherwise CMD.exe will automatically close.

PS: I +1'd MDT Guy's answer because I learnt a new shortcut.


share|improve this answer
Does this work when the file is on a different drive? I think you may need the /D swtich in "CD %~dp1 /D". – RJFalconer Feb 28 '14 at 11:51
@RJFalconer It does because of the line.. %~d1. That results in D: or E: etc. for the file. Editing answer to explain. Thanks for your edits. – LMSingh Feb 28 '14 at 21:58
Ah, I see. Neat. :) – RJFalconer Feb 28 '14 at 22:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.