Copy Command prompt output directly Clipboard in Windows
In Windows Vista, Windows 7, Windows Server 2003 and later,You can direct the output from a command from command prompt directly to the Windows clipboard using the windows clip.exe utility. All you need to do is to run the command you want to copy the output and pipe “|” the output to the clip utility which copies the output to the Windows clipboard.
This should work on Windows XP, but you may need to copy the clip.exe from either Windows 2003 or Windows Vista PC onto the Windows XP PC (to c:\windows\system32)
For instance, here I run the ipconfig command and direct its output to the clipboard.
C:\Users\sai>ipconfig /all | clip
This should copy the output to the the clipboard. To confirm, it indeed has been copied, simply select paste from any application like notepad, wordpad or Ms Word and you should see the output of the ipconfig /all command.
Windows IP Configuration
Host Name . . . . . . . . . . . . : ANNAI
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8040 PCI-E Fast Ethernet Controller
Physical Address. . . . . . . . . : 00-11-00-11-77-74
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe00::eddb:8445:fadd:c3c0%12(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 20 March 2009 06:26:07
Lease Expires . . . . . . . . . . : 23 March 2009 06:26:06
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Trackbacks & Pingbacks
Comments
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>






Very nifty hint, but I can’t get it to work on XP. I tried copying from Server 2003 (32 bit) to an XP SP3 machine, but it gives the error “clip.exe is not a valid Windows32 application”. It works fine on the Server 2003 machine.
That doesnt work in windows xp but you have a switch that which helps you to copy and paste the same.
“For instance, here I run the ipconfig command and direct its output to the clipboard.
C:\Users\sai>ipconfig /all | clip”
In this place what we can do in Winxp is
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\amarnadh.janaswamy>ipconfig /all > c:\ipconfig.txt
so u can see the same the location where you give while executing the command.