Copy command output to the clipboard with clip.exe

Windows ships clip.exe — pipe any command's output to it and the result lands on your clipboard, ready to paste into email or a ticket.

WindowsTerminaldeveloperclipboardLow risk
Run `<command> | clip` to copy its output, or `clip < file.txt` to copy a file's contents.

01Command

Command
$ type error.log | clip

02What it does

clip reads standard input until EOF, so it composes with anything: `ipconfig /all | clip`, `Get-Content log.txt | clip`, even `dir | clip`. In PowerShell remember the pipeline sends objects — use Out-String or redirect from cmd-style commands if formatting matters. The counterpart for the other direction is Get-Clipboard / paste (`type file > clipboard` isn't a thing; use `Get-Clipboard` in PowerShell), making simple copy-paste automations possible without any installed utility.

03Risk

RiskLow risk
Requirementsclip reads stdin, so anything pipeable works; no confirmation is shown.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • clip | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents clip.exe as reading standard input and placing it on the clipboard, with example redirects and pipes.
  • CLIP - Windows CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 shows clip usage with redirection (< file) and pipes (| clip) to copy text or command output to the clipboard.

Last verified: 2026-09-17 · Category: Developer

06Related solutions