Pages

Monday, 15 April 2013

GET COMMAND PROMPT FOR CURRENT WORKING DIRECTORY

This is a very simple and interesting trick

Normally when we open the cmd it's default path is set to C:\users\username .
windows has provided us a way by which we can access command prompt for the current working
directory

for this just go to the folder and press SHIFT + right-click. here you will find a option as "open command window here" just click on this option and you have done.


for some advanced users i have one more method
do it by making changes in registry files (use this method on your own risk because any unwanted change in registry files may cause serious damage to your OS)

just follow these steps:

  1. Start > Run
  2. Enter "regedit" and hit Enter
  3. Expand to "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell"
  4. Right-click on "shell" and select New > Key
  5. Make sure a new key is created under "shell". Change the name of this key to "Command Prompt"
  6. Right-click on this new key "Command Prompt" and select New > Key
  7. Change the name of this key to "command"

  8. Here's what we should have:

  9. Double-click on the "(Default)" text on the right window to bring up the edit box
  10. Enter this text into the Value Data field:
    cmd.exe "%1"
  11. Click OK and close the registry.  
the advantage of the second method over first is that you will not have to press shift key along with right-click

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Enjoy It !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!