Quickly Send Text From The Windows Command Line To The Clipboard

Grabbing information from the Windows command line could be easier, especially if all you know of is "Mark" and "Copy" in the windows' context menu. Fortunately, there's a great shortcut you can use, courtesy of the handy pipe ("|") argument, that can speed up the process of securing the text your command-line programs spit out.

We've previously shown the old trick of capturing a command's output using the ">" plus a filename, but this goes one step further by placing it directly on the clipboard, ready for a Ctrl+V. Amit Agarwal over at Digital Inspiration shows us that by substituting the > [filename] with | clip, you can have a command-line program redirect its content in this fashion.

Unfortunately, if you want to copy a typed-out command with arguments intact, you'll still need to use the old "Mark / Copy" method. If anyone has a shortcut for this (without the use of third-party programs), let us know!

How to Copy the Command Output to Windows Clipboard [Digital Inspiration]


Comments

    A hacky way of copying your command with arguments could be to write it out with an echo at the beginning.

    For example:

    echo command with arguments | clip

    Last edited 11/08/13 5:23 pm

    Just when I thought I knew them all. Thanks for this

    Mother of god!

    | clip..... All this time...

    Wondering how many years this has been around. Oh, and just to let you know how well Microsoft communicates internally, I used to work for them. In Redmond. In the Windows division.

Join the discussion!

Trending Stories Right Now