How can I easily send command output to the Windows clipboard?

A. You might be familiar with the notion of piping command output to "more" (| more). Doing so allows the output to be advanced one line at a time. A similar facility is provided by "clip," an external program that takes any input and writes to the clipboard. So, simply pipe the output of your command to "clip" (| clip). For example, to send the output of a directory list to the clipboard, use

C:\>dir | clip

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish