CMD Master
Back to Blog
Arnošt Havelka

Clip Command

Copy command output directly to your clipboard.

Start Interactive Lesson
Clip Command

The clip command is a hidden gem in Windows. It redirects Output from the command line directly to the Windows Clipboard (Ctrl+C). This is incredibly useful for copying file lists, file contents, or system information without selecting text with your mouse.

Try the command

Copy a directory listing to clipboard!

Build the command
dir|clip
Terminal
C:\Users\Student>dir | clip

How to Use It

clip works by receiving input from a "pipe" (|). You execute a command, pipe it to clip, and then you can Paste (Ctrl+V) the result anywhere else (Notepad, Email, Slack).

Real-World Examples

1. Copying file contents

Copy the entire contents of a text file to your clipboard.

Terminal
C:\Users\Student>type report.txt | clip

(Nothing appears on screen, but the content is now in your clipboard!)

2. Copying your IP address

Need to send your IP to a colleague?

Terminal
C:\Users\Student>ipconfig | clip

3. Copying a directory listing

Want to share what files are in a folder?

Terminal
C:\Users\Student>dir /b | clip

Knowledge Check

1 / 3

What does the clip command do?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Streams & Piping

Master data flow with Redirection and Pipes.