Sunday, January 29, 2006

Right click command prompt

Here's a handy tip that I got from a co-worker, who found it in the book Microsoft Visual C# .NET Step by Step. It creates a shortcut in the right click context menu of Windows Explorer to open a command prompt in the current directory. When I need to run scripts in a very long directory name, this is very handy.

So here's how you set it up:

Open up windows explorer
Tools -> Folder Options.
File Types Tab
Select the Folder file type
Click Advanced
Click New
For the Action type what ever you want the context menu to display, I used Command Prompt.
For the Application used to perform the action use c:\windows\system32\cmd.exe (note on win2k you will want to specify the winnt directory instead of the windows directory)

You can also use this feature to attach context actions to file types. Or if you want to create a right click open with option for any file type (for instance I like to be able to open any file with notepad, see: my blog entry here.
Post a Comment