Copy command line output to clipboard

Updated: 10/18/2022 by Computer Hope
Windows DOS command prompt window

Users of Microsoft Windows Vista, Windows 7, Windows 8, Windows 10, and Windows 11 can copy the output of command line commands, such as dir, to the clipboard using the clip command. For example, to copy the output of the dir command to the clipboard, you would type the following:

dir | clip

The above command is the dir command followed by a space and then a pipe character followed the word clip (as in clipboard).

Note

Users not utilizing the versions of Windows mentioned above or have another operating systems cannot access this command.