Open the command prompt from right-click menu

Save time and add an option to your right-click context menu that will open a command prompt at your current folder.

Many users find the command prompt very useful when it comes to doing down-and-dirty tasks such as mass deleting...

or renaming files. For example, when using Windows Explorer, they want to open the command prompt in the folder of their current location. That involves opening a command prompt and then navigating to your current folder.

However, there's a quicker way: you can add an option to the right-click context menu that will open a command prompt at your current folder.

For example, if you were to right-click the "C:\mydocs\official\finance" folder, you could open a command prompt at C:\mydocs\official\finance.

To add this option on right click menu, follow these steps:

  1. Run the Registry Editor
  2. Go to HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell.
  3. Create a new key called Command Prompt. For the default value, enter whatever text you want to appear when you right-click a folder for example, Open Command Prompt.
  4. Create a new key beneath the Command Prompt key called Command. Set the default value to Cmd.exe /k pushd %L.
  5. Exit the Registry.

The "pushd" command stores the name of the current directory, and %L uses that name to start the command prompt at it. The new menu option will show up immediately whenever you right click any folders. Note that it won't appear when you right-click a file; it shows up only when you right-click a folder.

Please let us know how useful you find this tip by rating it below! If you have a useful Windows tip, timesaver or workaround to share, submit it to our tip contest and you could win a prize!

This was first published in June 2006

Dig Deeper

PRO+

Content

Find more PRO+ content and other member only offers, here.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

  • Virtual desktop security guide

    To secure virtual desktops, consider antivirus, certificates and network vulnerabilities. Just remember, VDI doesn't always ...

  • Guide to low-cost desktop virtualization

    In this guide, learn to virtualize desktops without spending more than you would when deploying PCs, and what VDI vendors are ...

  • VDI pilot project guide

    A VDI pilot project should start with a VDI project plan. Know what pitfalls to avoid and test product options to achieve a ...

Close