Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In MacOSX there's a command which can pipe the output of a command to the clipboard so that it can be pasted somewhere else in the GUI.

Does Windows have an equivalent command or utility for doing this from cmd.exe or maybe in the form of a Powershell cmdlet?

share|improve this question

1 Answer 1

up vote 18 down vote accepted

Use something like:

someCommand | clip

That will pipe the result to the windows clipboard

share|improve this answer
Good suggestion. This is a standard Windows utility. On most systems, it's at C:\Windows\system32\clip.exe. –  Nicole Hamilton Sep 11 '12 at 3:48
@NicoleHamilton right, but since that is part of the PATH variable, that does not need to be made explicit –  soandos Sep 11 '12 at 3:50
My point and part of the reason I gave you an upvote was that I liked that you'd suggested a standard Windows utility, not something the OP was supposed to d/l from somewhere. Most people know about PATH. –  Nicole Hamilton Sep 11 '12 at 4:25
For posterity, if you want the content of a file it's 'type somefile.txt | clip' –  ferventcoder Feb 2 '14 at 21:10
Annoyingly windows echo adds a \r\n and has no echo -n ... so "echo test | clip" will have test\r\n in copy buffer ... echo|set/p="test"|clip ... addresses this gross –  hpavc Feb 11 at 4:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.