Copy text from a Windows CMD window to clipboard

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?


Another option, if you know ahead of time that you want the results of a command to be placed on the clipboard, is to pipe your output to the CLIP utility.

Here are a two simple examples

echo Hello world!|clip

dir|clip

  • Right click > Mark
  • Select the text you want to copy by holding left mouse button and selecting text OR by navigating to the beginning of the text you want to copy with the arrow keys, pressing Shift, and moving (with the arrow keys) to the end of the text.
  • right click on the title bar, go into "Edit", and hit Copy.

Now you can paste in Notepad or in Command Prompt again by right-clicking on the title bar, going into "Edit", and hitting "Paste."


Open a command window, then right click on the title bar and left click on Properties at bottom of context menu. On the Options tab add a check-mark at QuickEdit Mode. Click OK and in the next dialog select the second radio button so that every command window that you will open in future has got this option enabled. Close the dialog with OK.

Now you can select text using left click on your mouse. To copy the text to the clipboard, just press the Enter key.


Follow these steps:

  1. Move pointer with pointing device (mouse, touchpad, pointing stick, ...) over the window, press right button to open the context menu and left click on first context menu option Mark.
  2. After that action select the text with holding left button (rectangular selection).
  3. After selecting hit key Enter or Return to copy selected text to clipboard.
  4. Paste copied text anywhere with Ctrl+V.

  • Right Click > Mark
  • Select the text you want to copy with left click held
  • Right click on the selected text
  • Paste where you want