Copy text from a Windows CMD window to clipboard

Viewed 45592

Does anyone know if it's possible to copy text from a Windows' command prompt or console window like the output of a command, console application or batch file?

10 Answers

On PowerShell:

Copy contents in a text file to the clipboard. Use

cat filename.txt | clip

the contents will be copied to the clipboard.

Now, it's ready to ctrl + v

Select the text you want to copy. Then right click and select copy from menu. To paste in cmd right click, the text you copied should be pasted

Related