use the command "type" as an equivalent to "cat" in windows to pipe the files content in text format into stdout (standard output) for that is the Terminal/prompt emulator you're using (CMD in windows).
So you can combine the commands into something like this :
type myFile.txt > clip
now the content of myFile.txt is transferred to the clipBoard buffer (I think it's just a buffer since it's not linux ).
It's also a global value , so one value is held at a time OS wide.
So that's for the "copy" feature , now for the "paste" :
Either you want to append to an existing file the values of the CLIP like usual stuff:
type clip >> target.txt (or your target file - will add data without deleting the existing one inside that target file)
Or , you want to add/create a new file with the values of the CLIP like :
type clip > target.txt (or your target file - will add data or OVERWRITE means deleting the existing one inside that target file)
1
Aha, I knew it was asked before, for Windows: "How to pipe text from command line to the clipboard" at http://superuser.com/questions/97762/how-to-pipe-text-from-command-line-to-the-clipboard Maybe leave this open for Linux then?
– Arjan – 2010-02-25T21:56:45.1831Suburb. Looks like I can use clip.exe for this. Would still like a non-command line version though. Maybe via Windows Explorer context menu? – Jonathon Watney – 2010-02-25T22:08:27.277
See http://stackoverflow.com/questions/17819814/how-can-you-get-the-clipboard-contents-with-a-windows-command
– user66001 – 2015-08-02T03:53:26.447