Vista includes a program: clip.exe which will direct standard command prompt (DOS prompt) output to the clipboard. Just “pipe” or “here document” to clip.exe and the result goes to the clipboard.
- ex: echo “hello, world!” | clip
- ex: dir | clip
- ex: clip < readme.txt
Again, this is available on Vista. If you are using older versions of Windows, you can use our Dos2Clip program, which will do the same thing, but only with one line. You can get it here, and it’s free to use.