How to Copy Command Line Output to Clipboard from Windows Command Prompt

There is a very unknown command in Windows command prompt named as CLIP. This command can be used to copy the output of command in command prompt to windows clipboard. We can use clip command to copy list of folders and files names, directory structure, ping command output, copy file content and much more.

See also: Add Windows User Command line


Syntax of CLIP command

This command is available in Windows 7 and Window 8.x versions if you are Windows XP user and want to use clip command then google it to download Clip.exe and save it in you windows directory.

<command> | clip

dir | clip

here dir is windows command which output put the list of directory and file of current location and “| clip” (pipe sign clip) is used to copy the output of the command to windows clipboard.


As you can see the output is pasted in the notepad.


Ping | clip

Windows Ping command is use to diagnose / troubleshoot network related problems. If you want to send the output of this command to network administrator then using this command with combination of clip is great idea and save output to windows clipboard.



More ideas to use Windows clip command:

ipconfig | clip
You can use above command to save all the details about your network IP addresses, Network devices’ Mac address and much more.

ipconfig -all| clip
You can use “-all” switch with this command to copy the complete list of ipconfig to clipboard.

tasklist | clip
Save the list of currently active running tasks in task manager to clipboard.

tasklist - m | clip
You can use “-m” switch with the command to save some extra details about task DLLs associated with it.

type filename.txt | clip

This command will copy the content of the file to the clipboard.

You can use clip with different command, this is where I found useful using clip command, share below in comment how do you use it.


1 comment… add one
barrak hussein October 21, 2014, 10:21 pm

it copy with double space at the end.

Leave a Reply