posted on Sunday, March 26, 2006 8:14 PM
by
johnwood
CDClip: Command Line's Current Directory to the Clipboard
Have you ever been at the command line and realized you need to copy the current directory into another application? Pasting it into an open dialog for example? Normally you would go to Edit/Mark and select the current directory from the prompt… quite fiddly.
To make it easier I've created a very simple, free, small utility called cdclip.exe that you can run from any folder in the dos prompt and it puts the current directory into the clipboard ready to be pasted into any other application. Just copy the executable into the Windows folder (or any folder on your path) and that's it.
Download it from here http://www.servicestuff.com/jwss/cdclip.zip
The C# code is, of course, really simple:
Clipboard.SetDataObject(Environment.CurrentDirectory, true);