Many commands and operations, especially when you have to restore or configure a PC, have to be entered at the command line (or just CMD). Quite often I am asked on the blog questions like: 'how to quickly copy text from the command line?'.
Indeed, it's good if you need to find out something short: for example, the IP-address – you can simply rewrite it on a piece of paper. What if you need to copy multiple lines from the command line?
In this small article (mini-instructions) I will show you a couple of ways how to quickly and easily copy text from the command line. So…
Method number 1
First, you need to right-click anywhere in the open command prompt window. Then, in the pop-up context menu, select the 'mark' item (see Fig. 1).
Figure: 1.check – command line
After that, using the mouse, you can select the desired text and press ENTER (that's it, the text itself has already been copied and you can paste it, for example, into a notepad).
To select all text on the command line, press the CTRL + A key combination.
Figure: 2.selection text (IP address)
To edit or process the copied text, open any editor (for example, notepad) and paste the text into it – you need to press the CTRL + V key combination.
Figure: 3.copy IP address
As you can see in fig. 3 – the method is completely working (by the way, it also works in the newfangled Windows 10)!
Method number 2
This method is suitable for those who often copy something from the command line.
First of all, you need to right-click on the top 'strip' of the window (the beginning of the red arrow in Fig. 4) and go to the command line properties.
Figure: 4.CMD properties
Then, in the settings, put a checkmark in front of the items (see Fig. 5):
- mouse selection;
- fast insertion;
- allow keyboard shortcut with CONTROL;
- clipboard content filter when pasting;
- enable line break highlighting.
Some settings may differ slightly depending on the OS version Windows.
Figure: 5. mouse selection …
After saving the settings, in the command line you can select and copy any lines and symbols.
Figure: 6.selection and copying on the command line
That's all for me today. By the way, one of the users shared with me another interesting way, how he copied text from CMD – he just took a screenshot in good quality, then drove it into a text recognition program (for example FineReader) and copied the text from the program where needed …
Copying text this way from the command line is not a very 'efficient way'. But this method is suitable for copying text from any programs and windows – i.e. even those where copying in principle is not provided!