Copying command prompt output directly to the Windows clipboard

by admin on March 26, 2009

How often have you wanted to copy the output of a Windows command from the command prompt, but had to go thought the process of marking and copying the text first? 

Redirecting the command and it’s output is as easy as this:

ipconfig /all | clip

will pipe the results of ipconfig into the clipboard, which can then be pasted into notepad with a CTRL-V.  How convienent is that!  This works in Windows 2003 and higher (sorry, no Windows XP).

Found at http://www.windowsreference.com/windows-server-2008/copy-command-prompt-output-directly-clipboard-in-windows/

{ 3 comments… read them below or add one }

Andy Parkes March 26, 2009 at 6:17 pm

Awesome!

Will certainly come in handy

Reply

AdamV April 8, 2009 at 5:05 am

This works natviely in Windows 2003, 2008, Vista, and Windows 7 beta; previously it was only in the Resouce Kits.
But…you can simply copy clip.exe from Windows 2003 to your XP machine and it works there too.
See this article (freakily published almost exactly two years before this one, out by one day):
http://veroblog.wordpress.com/copying-command-line-results-to-the-clipboard-in-vista/

Reply

DanO May 20, 2010 at 2:46 pm

An easier way:

ipconfig /all>>ipconfig_all.txt
notepad c:\ipconfig_all.txt

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: