CLIP.exe

Copy the result of any command to the Windows clipboard.

Syntax
      command | CLIP

      CLIP < filename.txt

When using clip.exe in a batch script you should warn the user that their clipboard is about to be overwritten.

Examples

Send a directory listing to the clipboard:

DIR | CLIP

Send the current date to the clipboard:

DATE /t | CLIP

Send the hostname to the clipboard:

hostname| clip

“The stupid neither forgive nor forget, the naive forgive and forget, the wise forgive but do not forget” ~ Thomas Szasz (The second sin)

Related commands

SET - Display, set, or remove Windows environment variables.
Equivalent PowerShell: Set-Clipboard - Set the current Windows clipboard entry.
Equivalent bash command (Linux): xsel - get and set the contents of an X-window selection. Or Shift-Insert.


 
Copyright © 1999-2024 SS64.com
Some rights reserved