GeekPolice Tech TutorialsLog in

 


How to Copy Command Line Output to the Windows Clipboard

Share

20180513
How to Copy Command Line Output to the Windows Clipboard

How to Copy Command Line Output to the Windows Clipboard

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. The pipe operator (|) takes the output of one command and directs it into the input of another command which in our case is clip.

The CLIP command allows you to copy the results returned by a command in the Command Prompt. This trick can be useful if you need to paste the results of a command, for example, in a forum, it avoids the manual entry of all the data.



Copying The Results To The Clipboard

1. Open the Command Prompt by clicking Start Menu --> All Programs --> Accessories. In Windows Vista and later versions of Window operating systems type cmd.exe into Start Screen or Start Menu, and from the search result click the Cmd.exe. If the command-line tool you’re executing requires administrative privileges, you need to open Command Prompt as administrator (also known as “elevated Command Prompt”.)

2. In the Command Prompt window, type in the command you want to run. For example, someone who’s helping you wants to know your system information, type following command and press ENTER key.

Code:

systeminfo | clip




That would copy the output of the systeminfo command to the Windows Clipboard. This is done by Clip.exe receiving the command-line output directly.

Once the output is sent to clipboard, you can paste it in any editor window. You can open Notepad and paste (Ctrl + V) the contents there.



Did you find this tutorial helpful? Don’t forget to share your views with us.
remove_circleSimilar topics

Comments

No Comment.
Permissions in this forum:
You cannot reply to topics in this forum