Copying a Command's Output to the clipboard

http://www.labnol.org/wp/images/2008/03/dos-command-clipboard.gif

http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/

http://www.labnol.org/wp/images/2008/03/dos-clipboard-command.gif

http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/
C:\Documents and Settings\taizo\desktop>which clip
C:\Documents and Settings\taizo\desktop\clip
C:\WINDOWS\system32\clip.exe

C:\Documents and Settings\taizo\desktop>clip /?

CLIP

Description:
    Redirects output of command line tools to the Windows clipboard.
    This text output can then be pasted into other programs.

Parameter List:
    /?                  Displays this help message.

Examples:
    DIR | CLIP          Places a copy of the current directory
                        listing into the Windows clipboard.

    CLIP < README.TXT   Places a copy of the text from readme.txt
                        on to the Windows clipboard.

C:\Documents and Settings\taizo\desktop>

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(http://www.petri.co.il/) or written something similar on their own.

http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/

We all know that you can easily direct a command's output to a text file by using the ">" character:

ipconfig /all > c:\ipsetting.txt

However, although this can be very useful when searching for a string or when documenting a setting, if you only need to copy the output into a different program, you can try this trick:

http://www.petri.co.il/quickly_copy_error_and_display_messages.htm

On Windows Server 2003:

1.

Open Command Prompt by running CMD.EXE from the Run menu.
2.

In the CMD window, type your required command. I've used IPCONFIG for example:

    ipconfig /all

3.

Do NOT press ENTER after the command, instead, add the following command to the end of your command:

    ipconfig /all | clip

Lamer note: This is not the "i" letter, nor the capital "I" letter, is it not the "l" (non-capital L) letter, nor is it the number "1". The "|" is obtained by pressing SHIFT and the "\" button on your keyboard.

4.

Now, open Notepad.exe from the Run menu, and paste the clipboard's contents by pressing CTRL + V.

5.

Go tell your friends how great this site is...

:-)

http://www.petri.co.il/quickly_copy_error_and_display_messages.htm

On Windows XP/2000:

The same tip applies here, but first you must copy the CLIP.EXE file from a Windows Server 2003 into your system's path (best if placed in %systemroot%\system32 folder).

You can also get the file from HERE(http://www.petri.co.il/software/clip.zip) (14kb)

http://www.petri.co.il/quickly_copy_error_and_display_messages.htm