Search code examples
windowsbatch-filecmd

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?


Solution

    • 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."