Welcome to Sign in | Join | Help
in
Home Blog Forums

The Lazy Admin

Redirect Command Line Output to the Clipboard

Sponsor


Have you ever been working in the command line and want to send the output of a command to another document? Well we can right-click the command window and select Mark and then copy and paste into the document, or add > c:\info.txt to the end of the command line and get the info from the text file, but there is a better way!

Windows Server 2003 allows you to redirect directly to the clipboard. As an example lets say I wanted to run IPConfig /all and send the output to the clipboard; by adding "| clip" to the end of the command the output will be redirected. As a trial run the following command on a Windows 2003 Server ipconfig /all | clip Now open up Notepad and press Shift+Insert or Ctrl+V. Pretty amazing isn't it!

This feature isn't available in Windows 2000 or Windows XP, however if you copy Clip.exe from %systemroot%\system32 on your 2003 machine to the same location on your Windows 2000 or XP machine it should work. There are a couple of other ways to get data to the clipboard that have been around for a while.

Both the following tips will work in Windows 2000, XP and 2003. Event Log event properties includes a button to copy the text from the message to the clipboard. On the top right corner there are two arrows, one pointing up and the other down. Under these arrows is a third button, pressing this will copy the event properties to the clipboard.

One last little tip I use often to copy the text from an error popup to the clipboard. This is an oldie but a goodie. When you have an error message (or any other type of system message) popup, highlight the title bar for the message and press Ctrl+C. The text from the error message will be copied to the clipboard and be ready to paste with Ctrl+V or Shift+Insert.





Published Thursday, June 29, 2006 6:06 AM by rodney.buike

Comments

No Comments
Anonymous comments are disabled

This Blog

Powered By

 

Syndication

Sponsors

 
 
Get a free 5GB e-mail account @isalazyadmin.com

Certifications & Awards




All postings are provided "AS IS" with no warranties, and confer no rights.
Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.