TIL: you can pipe to clipboard
RobertKaucher
Member Posts: 4,299 ■■■■■■■■■■
in Off-Topic
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.
Wow. I wish I had known this 4 years ago...
C:\Users\rkaucher>ipconfig | clipOr in PowerShell
PS C:\Windows\system32> Get-ChildItem | clip
Wow. I wish I had known this 4 years ago...
Comments
-
ptilsen Member Posts: 2,835 ■■■■■■■■■■To think of all the time I've wasted text-file redirecting...
-
undomiel Member Posts: 2,818Nice 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/
-
crrussell3 Member Posts: 561Awesome find!MCTS: Windows Vista, Configuration
MCTS: Windows WS08 Active Directory, Configuration -
Slowhand Mod Posts: 5,161 ModThat's obscenely useful. Excellent find and thank you for sharing!
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. -
Akaricloud Member Posts: 938Wow, I can't believe I've never seen this done before. Thanks! That will be extremely useful.
-
paulgswanson Member Posts: 311What 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) -
RobertKaucher Member 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.