Click here to Skip to main content
15,867,453 members
Articles / Programming Languages / C++
Article

Starting a DOS prompt from Windows Explorer

Rate me:
Please Sign up or sign in to vote.
4.78/5 (28 votes)
16 Nov 2000 230.3K   35   44
How to start a dos prompt by right-clicking on a folder in Windows Explorer

Introduction

Even if a lot of operations can be done directly from the Windows Explorer, it is still necessary, sometimes, to open a DOS prompt to perform a particular task. Typing the full path of a directory can be really annoying. Recently, I've learned a way of starting a DOS prompt with its current directory set to a particular folder The following steps will show you how to add an entry in the pop-up menu that appears when you right-click on a folder from the Windows Explorer. Selecting this entry will open a DOS prompt with its current directory set to the folder you just right-clicked.
  1. Open your registry (regedit)

  2. Go to the following key: HKEY_CLASSES_ROOT\Folder\shell
  3. Add this key: CmdPrompt and set its default value to: "Command Prompt"
  4. Under this new key, add the following key: Command and set its default value to: "c:\winnt\system32\cmd.exe"

You should now have this tree in your registry:

That's it. Now, whenever you will right-click on a folder, the pop-up menu will contain an entry called "Command Prompt".

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralOr paste cmd.bat into the directory... Pin
craig4wd27-Aug-08 22:05
craig4wd27-Aug-08 22:05 
GeneralRe: Or paste cmd.bat into the directory... Pin
aprilkacau10-Oct-10 10:31
aprilkacau10-Oct-10 10:31 
GeneralNOTE: change Path on XP to WINDOWS for command key Pin
tedzzz14-Sep-06 6:19
tedzzz14-Sep-06 6:19 
GeneralAllow UNC paths Pin
Jose Xavier4-Nov-04 6:04
Jose Xavier4-Nov-04 6:04 
QuestionDOS or not? Pin
mebmer 12345678924-Sep-04 23:41
mebmer 12345678924-Sep-04 23:41 
GeneralAn even easier way for XP Pin
coderitr22-Jun-03 3:28
coderitr22-Jun-03 3:28 
GeneralRe: An even easier way for XP Pin
saltynuts20029-Sep-03 20:03
saltynuts20029-Sep-03 20:03 
GeneralRe: An even easier way for XP Pin
Anonymous17-Dec-03 4:08
Anonymous17-Dec-03 4:08 
GeneralRe: An even easier way for XP Pin
Anonymous22-Jun-04 9:38
Anonymous22-Jun-04 9:38 
GeneralHow to delete/edit erroneous file folder type associations Pin
kpatelPro29-Oct-04 15:11
kpatelPro29-Oct-04 15:11 
GeneralRe: An even easier way for XP Pin
gabmurillo20-Jul-04 5:24
gabmurillo20-Jul-04 5:24 
GeneralRe: An even easier way for XP Pin
kpatelPro20-Dec-04 18:23
kpatelPro20-Dec-04 18:23 
GeneralRe: An even easier way for XP Pin
lars@phobe.com17-Apr-05 21:49
lars@phobe.com17-Apr-05 21:49 
GeneralTry this Pin
mgomez15-Jan-03 2:34
mgomez15-Jan-03 2:34 
GeneralWin XP problem Pin
22-May-02 15:01
suss22-May-02 15:01 
GeneralKeeping it simple is great, but taking it a bit further... Pin
Dan Madden28-Apr-02 20:55
Dan Madden28-Apr-02 20:55 
GeneralVery good! Man Pin
10-Apr-02 12:58
suss10-Apr-02 12:58 
QuestionHow to do this to a file? Pin
18-Feb-02 20:34
suss18-Feb-02 20:34 
AnswerRe: How to do this to a file? Pin
18-Apr-02 9:16
suss18-Apr-02 9:16 
GeneralSafest yet Easiest way Pin
makemani29-Jan-02 12:31
makemani29-Jan-02 12:31 
GeneralRe: Safest yet Easiest way Pin
27-Mar-02 3:07
suss27-Mar-02 3:07 
GeneralRe: Safest yet Easiest way Pin
10-Apr-02 13:11
suss10-Apr-02 13:11 
GeneralRe: Safest yet Easiest way Pin
imuav3-May-07 14:24
imuav3-May-07 14:24 
GeneralRe: Safest yet Easiest way Pin
Hogfather13-May-08 5:13
Hogfather13-May-08 5:13 
GeneralThat's always been good.... Pin
cero20-Dec-01 9:46
cero20-Dec-01 9:46 
..or if you have the window open already displaying the folder you can just drag the folder to a dos window..path will be written for you but registry way is always better

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.