Thursday, November 21, 2024
HomeWindowsCopy Text File or Directory into Clipboard from Command Line

Copy Text File or Directory into Clipboard from Command Line

Pushing a file, directory listing, or other text into the clipboard from the command line is very clever and useful.

In all modern versions of Windows, you can pipe information to clip to push text into the clipboard. Here are some examples:

To push a directory listing into the clipboard:

dir/w | clip

copy directory to clipboard from command line

To copy a text file into the clipboard:

type textfile.txt | clip

David Kirk
David Kirk
David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!