Command Prompt from Windows Explorer

Have you ever wanted to launch the Command Prompt from a specific folder in Windows Explorer?  Working with more command-line type of tools with my current company has prompted more of this behavior in my day to day tasks.
There may be a number of ways to do this, for example, PowerToys DosHere (do a search for it).
However, if you want to do it manually, you can perform these few steps.
1. Launch Windows Explorer.
2. On the main menu, go to ‘Tools->Folder Options’ and then navigate to the ‘File Types’ tab.
3. The list of file types you see have two columns: ‘Extensions’ and ‘File Types’.  Look for an extension of "(NONE)" and a File Type of "Folder" and select that entry.
4. Click the ‘Advanced’ button.  An ‘Edit File Type’ dialog will pop up.
5. Click ‘New…’ and a ‘New Action’ dialog will pop up.
6. Under ‘Action’, call it what you want.  For example, "Command Prompt" (w/o the quotes).
7. Under ‘Application used to perform action’, enter in "C:WindowsSystem32Cmd.exe /k cd" (w/o the quotes).
8. Click OK to get out of all the dialogs.
9. Done.  Now, when you right click any folder, you should see your new action.  In these steps, I used "Command Prompt".  Clicking the new action will open Cmd.exe with a default directory of the folder you clicked from Windows Explorer.

Final Note:
If you ever need to remove this or modify the settings, you will have to delete the appropriate key from the Registry.  Typical "Registry Disclaimer" applies here so don’t try this if you’re not comfortable messing with the Registry.
The registry location is:
HKCR/Folder/shell/<action name>
where <action name> is the Action Name you gave it from step #6.
To remove, delete the <action name> key.
To rename, rename the <action name> key.
To modify the command, go to <action name>/command and modify the (Default) String value.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s