Command Prompt Tricks

Copy Text File To Clipboard With Command Prompt

A nice command for your understanding. Many of us may not know this. CLIP is a command which will copy the content of a text file to clipboard. After the file content get copied you can paste your clipboard at anywhere you want.

I am anxious about it, tell me soon

Oh sorry for being bit lengthier.  But I have something more to say. Using this command you can do two things.
  • Copying the output of a command to clipboard
  • Copying the content of a text file  to clipboard
Now I gonna tell you the the syntax for both


1. Copying the output of a command to clipboard

You can directly copy the output of any command to clipboard. The syntax is as follow:

command | clip 

Example: If you want to copy the output of dir command to clipboard then write the following.

dir | clip

2. Copying the content of a text file to clipboard

You can copy the content of a text file to clipboard via command prompt without even opening it. Just follow the below syntax.

dir < NameOfTheTextFile

Example: If you want to copy the content of ReadMe.txt to clipboard then type the following

dir < ReadMe.txt

See you next time with interesting things. Bye.  
.
.
.
Hey wait…. Just a message to you. You don’t have to pay anything for liking our Facebook fan page. It is absolutely free and you will get instant updates right in your account. Be a smart guy.
    

Leave a Reply

Your email address will not be published. Required fields are marked *