Send to Command Prompt

By Michael Flanakin @ 5:33 AM :: 2051 Views :: Technology :: Digg it!

I'm a fan of the Send To context menu. I've been using Notepad2 Mobile-ready link for quite some time and always set up a Send To menu item so I can open text files quickly -- right click+N+N. The menu flashes briefly and my document pops up. Granted, if anything else starting with N is in the Send To menu, that'll go out the window, but I haven't had a problem, yet, so I'm happy.

When exploring a few of the Sysinternals tools Mobile-ready link that were recently added to Microsoft's website, I decided to add another shortcut to execute something in an open command prompt. This will be quite useful as I tend to create batch files to perform common, repetitive actions. The nice thing is, with my new Send To > Command Prompt, I'm now three keystrokes away from executing and interacting with something in the command prompt -- right click+N+C+Enter. I have to hit Enter because there's already a C item in the menu, Compressed (ZIP) Folder. I could rename it to Prompt to get rid of that extra step... As a matter of fact, I will. Ok, so now I'm back to 2 keystrokes -- right click+N+P. Life is beautiful again.

For those interested, here's the shortcut I'm using: C:\Windows\System32\cmd.exe /K. The /K option keeps the command prompt open after executing the command that's passed to it -- namely, the file you right click on. One more thing: Make sure the Start In directory is empty. If this is specified, your file will most likely not get executed. Essentially, this would look for the file you click on in the Start In directory. So, if you click on a file called RunMe.bat and have Start In set to C:\Users\Michael\AppData\Roaming\Microsoft\Windows\SendTo\ (the default when you create a new shortcut from the Send To directory in Vista), then the command prompty will try to execute C:\Users\Michael\AppData\Roaming\Microsoft\Windows\SendTo\RunMe.bat, which most likely doesn't exist.

Hope this helps someone out there!