Use the Windows command-line tool, clip.exe, to redirect output to the clipboard May 18, 2018 Windows 10 (not sure about earlier versions) has a built-in program, clip.exe, that lets you redirect command-line output to the clipboard. Examples: 1 2 dir | clip type foo.txt | findstr /i "bar" | clip Reddit discussion