ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

How to Copy the Command Output to Windows Clipboard - and to CHS

(1/1)

IainB:
Apologies for any duplication if this has already been posted in DCF.

Nifty tip from Labnol.org: How to Copy the Command Output to Windows Clipboard

Just use the Pipe (|) and "clip"

Example:
Typing dir | clip at the Command prompt puts the directory list into the Clipboard, or directly into CHS (Clipboard Help & Spell) if you are using it.

Winkie:

Note that the clip command isn't available on Windows XP and earlier versions op Windows by default. See here for more information and instructions how to obtain the functionality if  your system does not have it.

x16wda:
There is another utility called cb.exe that does the same thing, though I'm not sure what source I got it from.  But you can also use winclip.exe to push stdin to the clipboard, or pull the clipboard contents into a file (or just to the cmd window if you want to see what's in there).

4wd:
There is another utility called cb.exe that does the same thing, though I'm not sure what source I got it from.-x16wda (August 11, 2013, 03:40 PM)
--- End quote ---

You can download cb.exe from the AutoHotkey FAQ: Download link

lanux128:
i use ClipCopy which was written by a fellow DoCo member, ChalkTrauma.

Usage* This will copy the output from dir /b to clipboard
dir /b | clipcopy

* This will do the same but echo out to stdout at the same time ( like tee )
dir /b | clipcopy -e

* This will dump the text contents of the clipboard to stdout
clipcopy -g

* So you can dump the clipboard contents to a file like this
clipcopy -g > clipboard.txt

* You can also put strings directly on the clipboard like this
clipcopy this is going to the clipboard

Well, that is about all it does, you can type clipcopy -h for usage..

DL: http://www.dreamcycle.net/download/?ClipCopy.exe
Source: https://www.donationcoder.com/forum/index.php?topic=15720.msg138125#msg138125

Navigation

[0] Message Index

Go to full version