How to Copy the Command Output to Windows Clipboard | My Tricks Website

Search This Blog

Powered by Blogger.

Popular Posts

Follow us!


You can also receive Free Email Updates:

Widget by ST



Tuesday 20 August 2013

Like it or not, the command prompt is still an indispensable part of your Windows computer because there are still a bunch of things that can only be done by writing commands.
For instance, if the computer isn’t connecting to the Internet, you will probably be interested in the output of the “ping” or the “tracert” command. If you need to print the contents of a directory in Windows, the command “dir” will come to your rescue.
Now here’s a little trick. If you add the pipe* operator (|) to your command followed by the “clip” command, the output of your original command will get saved to the Windows clipboard and won’t print inside the Command Prompt window.
Here are some examples:
  • dir | clip Copy the content of a folder to the clipboard.
  • tree | clip  Display the recursive directory structure and save it to the clipboard.
  • type error.log | clip Place the content of the file error.log to the clipboard.
  • sort file.txt | clip Sort the file and save the sorted output to the clipbord.
  • ipconfig /all | clip Get details of your network connection for sending to tech support.

How to Copy the Command Output to Windows Clipboard

The “clip” command may not be available on Windows XP but in that case, you can use the redirect operators, like > and >>, for saving the command output to a text file.
Alternatively, right-click anywhere inside the command window, select Mark from the contextual menu, use the mouse to highlight a block text and then press Enter to save it to the clipboard.
[*] The pipe operator (|) takes the output of one command and directs it into the input of another command which in our case is clip.

Categories: Pc Tricks, Tricks, Windows

Stay Connected With Free Updates!

Subscribe via Email

Follow us!

Like the Post? Do Share with your Friends.

0 comments:


Posts a comment

Copyright © 2012 - 2013. MyTricksWebsite - All Rights Reserved
Homepage | About | Contact | Privacy Policy
(Articles cannot be reproduced without permission from the author.)
Author : Navdeep Singh | Powered by: Blogger
DMCA.com