Open a command prompt from any folder

Post image for Open a command prompt from any folder

by Steve Wiseman on March 4, 2010 · 0 comments

in Command Line,Tips,Windows

Windows 7, and Vista have a cool feature. Press shift while right clicking on any folder, and some new menu options are shown:

Open Command Prompt Here

One of them allows you to open a command prompt that is rooted right in that folder. This is a convenient option, since you don’t have to launch a command line, and then work your way back to that folder.

Unfortunately it does not exist in 2000, 2003, or XP – But I found an easy way to add it.

Create a new file on your desktop and call it “Command.reg”. Right click on it and edit it with notepad.

Add the following lines:

REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Open Command Line Here"
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd /k \"cd %L\""

Save it, and then double click on it to add it to the registry. When it asks you to confirm.

Registry Confirm Window

Just say yes.

And now, when you right click on a folder in XP/2000/2003 (No shift needed) you get the same option:

Open Command Line Here XP

Like this article? Then sign up for my newsletter to get free tips and software sent right to your inbox once a week. Like you, I hate spam – I will never spam, or sell your email address.

Related Articles

Leave a Comment

Previous post:

Next post: