Search This Blog

January 11, 2008

How to open a Command Prompt from the current folder

When working on batch files, most of the people faced the problem of openning a command prompt and changing to the current directory.

The command prompt can be opened from any folder, and when openning the command prompt displays the current folder. To achieve this follow the following steps

  1. Open Windows Explorer
  2. Go to Tools -->Folder Options in the menu
  3. In the Folder Options dialog go to "File Types" tab
  4. Select the "Folder" under FileTypes
  5. Click on Advanced button
  6. In the "Edit File Type" dialog click on "New" button
  7. In the "Action" text box enter " Command Prompt"
  8. In the "Application used to perform action" text box enter C:\WINDOWS\system32\cmd.exe
  9. Click ok
  10. open the Windows folder you want to open the command prompt
  11. Right click on that folder, you can see the Command Prompt in the popup menu.
  12. Click on "Command Prompt" it will open the command window with the current folder.