Copy Command Line Output to Windows Clipboard Directly
Windows XP offers no easy solution for copying the output of DOS commands to the clipboard.
You have to select Mark from the contextual menu, use the mouse to highlight text that has to be copied and then press Enter.
Some DOS veterans use the redirect operator (> or >>) that puts all the command line output to a text file which can be opened in Notepad. (Also read: "Most Useful Windows DOS Commands")
Since both the above methods involve way too many steps, we look at a simple alternative - use Clip - a free DOS utility from Microsoft that is included in Windows Server 2003 resource kit but works just fine for Windows XP or Vista.
Just copy this clip.exe [14 kb] file to your Windows folder and then use it with a PIPE (|) operator in your DOS commands. Here are some examples:
dir /h | clip - Copy the help manual for DIR command to the clipboard
tracert www.labnol.org | clip - Trace the path from your computer to another website - the output is automatically copied to the clipboard and not displayed on the screen.
netstat | clip - Check if your computer is connecting to websites without your knowledge.
The clip.exe utility can also be used to copy contents of text files to clipboard directly from the command line.
clip < C:\AUTOEXEC.bat - this will copy all the text from autoexec.bat to your Windows Clipboard.
Related: Store More Content in Your Windows Clipboard.
The clip.exe file comes only with the Windows 2003 or Windows Vista so I am not sure if they are distributing the original Windows file on petri.co.il or written something similar on their own.

I guess ‘>’ & ‘>>’ will be handy in any shell
Great tip,thanks
hi there,
I accomplish the same using a perl script(which has win32 extensions).
good to know about the clip.exe : now I can ask colleagues to use this technique as well (earlier it was tough to ask them to install perl just for this utility)
BR,
~A
I use console instead of cmd. console supports the normal copy/paste
Why does it seem that every time something is posted on a forum re. command line tips for Windows, some Linux user has to butt in with a comment about how their console is better than cmd in Windows? Really, it’s just annoying, and it’s irrelevant. But mostly it’s just a bore. Please stop it. Thanks.
i think he meant console the windows cmd replacement. http://sourceforge.net/projects/console