TIL: you can pipe to clipboard

RobertKaucherRobertKaucher A cornfield in OhioMember Posts: 4,299 ■■■■■■■■■■
I consider myself well-versed in the Windows command line and PowerShell, but today I learned that you can pipe commands to a little known application called clip that puts the output into the clipboard.
C:\Users\rkaucher>ipconfig | clip
Or in PowerShell
PS C:\Windows\system32> Get-ChildItem | clip

Wow. I wish I had known this 4 years ago...

Comments

  • NotHackingYouNotHackingYou Member Posts: 1,460 ■■■■■■■■□□
    Awesome!!!!
    When you go the extra mile, there's no traffic.
  • ptilsenptilsen Member Posts: 2,835 ■■■■■■■■■■
    To think of all the time I've wasted text-file redirecting...
    Working B.S., Computer Science
    Complete: 55/120 credits SPAN 201, LIT 100, ETHS 200, AP Lang, MATH 120, WRIT 231, ICS 140, MATH 215, ECON 202, ECON 201, ICS 141, MATH 210, LING 111, ICS 240
    In progress: CLEP US GOV,
    Next up: MATH 211, ECON 352, ICS 340
  • undomielundomiel Member Posts: 2,818
    Nice find, I definitely wish I had known this earlier. It'll clean up a lot of those text files I scatter around with long command outputs.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • crrussell3crrussell3 Member Posts: 561
    Awesome find!
    MCTS: Windows Vista, Configuration
    MCTS: Windows WS08 Active Directory, Configuration
  • QordQord Senior Member Member Posts: 632 ■■■■□□□□□□
    Awesome. Most exciting thing so far this week!! (Is that bad?)
  • SlowhandSlowhand MCSE: Cloud Platform and Infrastructure, MCSA: Windows Server 2003/2012/2016, CCNA Routing & Switchi Bay Area, CaliforniaMod Posts: 5,161 Mod
    That's obscenely useful. Excellent find and thank you for sharing! icon_thumright.gif

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • AkaricloudAkaricloud Member Posts: 938
    Wow, I can't believe I've never seen this done before. Thanks! That will be extremely useful.
  • paulgswansonpaulgswanson Member Posts: 311
    What the bleepers! That'll make ping sweeps a bloody breeze!
    http://paulswansonblog.wordpress.com/
    WGU Progress: B.S. Network Management & Design <- I quit (got bored)
  • RobertKaucherRobertKaucher A cornfield in OhioMember Posts: 4,299 ■■■■■■■■■■
    C:\Users\Bob>clip /?
    
    
    CLIP
    
    
    Description:
        Redirects output of command line tools to the Windows clipboard.
        This text output can then be pasted into other programs.
    
    
    Parameter List:
        /?                  Displays this help message.
    
    
    Examples:
        DIR | CLIP          Places a copy of the current directory
                            listing into the Windows clipboard.
    
    
        CLIP < README.TXT   Places a copy of the text from readme.txt
                            on to the Windows clipboard.
    
    Reading contents of a file is pretty cool as well.
Sign In or Register to comment.