Technical Discussion
  >> Windows Issues


Register (or login) on our website and you will not see this ad.


Pages in this thread: 1 | 2 | (show all)   Print Thread
Standard User scopio
(regular) Sat 28-Jul-12 16:10:11
Print Post

How to copy text from CMD (command prompt) to the clipboard


[link to this post]
 
How to copy text from CMD (command prompt) to the clipboard in Windows 7. (Don’t know if it applies to other Windows versions)
1. Open the Command Prompt window, Start button > Accessories > right click Command Prompt, or Start button > in the search box area type cmd and press Enter.
2. When Command Prompt window opens, right-click on the Command Prompt title bar at the top of the window and choose “Properties” from the drop down menu.
3. Click on the “Options” tab if it is not already open, click in the box next to “Quick Edit Mode Options” section to enable it and click OK.
4. Now, you just need to select text by moving the cursor over it, as usual.
5. The only difference now from the normal copy and paste is you have to press the “ENTER” key to copy the selected text to the Clipboard!
6. Open or navigate to where you want to paste the selected text, for example Note Pad, Word etc. right-click and paste it.
Done, you can now select text, press enter and paste it whenever you need to!
Hope this helps. smile

Edited by scopio (Sat 28-Jul-12 16:12:31)

Standard User camieabz
(sensei) Sat 28-Jul-12 16:14:51
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
Right click text area, click select all and hit 'enter'. Then paste.

Worked on XP, and Vista.

~ Camieabz ~

All Connection Data ~ Some plusnet links

mod'er·a'tion n.
Synonyms: temperance, restraint, modesty.
Standard User 5km
(knowledge is power) Sat 28-Jul-12 16:26:38
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
Yes over complicating something so simple really helps ... not ... lol.

Follow "camieabz" instructions for the simple way.

O2 Broadband Premium LLU
Now on twitter @timmay2


Register (or login) on our website and you will not see this ad.

Standard User XRaySpeX
(eat-sleep-adslguide) Sat 28-Jul-12 16:39:23
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
Long-winded!

Is this the place for Windows tutorials until someone asks for help? I think not! You could fill this forum with Windows Hints.

BTW: Different Windows flavours usually behave the same in these respects.

1999: Freeserve 48K Dial-Up => 2005: Wanadoo 1 Meg BB => 2007: Orange 2 Meg BB => 2008: Orange 8 Meg LLU => 2010: Orange 16 Meg LLU => 2011: Orange 19 Meg WBC
Standard User The_Jimster
(committed) Sat 28-Jul-12 16:50:12
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: camieabz] [link to this post]
 
and win7
smile
Standard User BatBoy
(legend) Sat 28-Jul-12 16:52:45
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
In the properties of console windows, you can turn on QuickEdit mode, which allows the mouse to be used to select text without having to go explicitly into Mark mode. (In a sense, the console window is permanently in Mark mode.) Why isn't this on by default? It's so useful!

Somebody thought the same thing and changed the default in one of the earlier versions of Windows (my dim recollection was that it was Windows 2000) without telling anyone, especially not the manager responsible for the feature itself.

The change was slipped in late in the game and made it into the released product.

And then all the complaints came streaming in.

Since the change wasn't part of any of the betas or release candidates, customers never got a chance to register their objections before the product hit the streets.

Why did customers object anyway? Because it breaks console programs that want to use the mouse. A console program that calls ReadConsoleInput can receive input records related to mouse activity. A full-screen character mode editor like, say, emacs or vi or something more Windows-centric like the M editor that came with the Programmer's Workbench will use the mouse to select text within the editor itself. Or they might hook up a context menu to right-clicks. At any rate, turning QuickEdit on by default means that the mouse stops working in all of these programs.

A hotfix had to be issued to change the QuickEdit default back to "off". If it means that much to you, you can turn it on yourself.



_____________________________________________________________________________________________ this is not usenet __________________
Standard User broadband66
(experienced) Sat 28-Jul-12 17:21:12
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: 5km] [link to this post]
 
Not so simple if just a small selection of text is required.

Anyway, once the Quick Edit Mode has been ticked then it is far quicker next time and not "Long Winded" at all.

Was Eclipse Home Option 1 & VM 2Mb
Now O2 standard
Standard User Deadbeat
(knowledge is power) Sun 29-Jul-12 10:58:49
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
As it's generally only the output of a command that's needed, why not just pipe or redirect it?
For example:

dir | clip will send the output of the "dir" command to the clipboard.
dir > filename.txt will send the output of the "dir" command to a file called "dir.txt"

Copying the following, saving it as a .reg file and running it will give you a "Command Here" context menu entry which will save you CD'ing to where you want to be:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Here]
@="Command Here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Here\Command]
@="cmd.exe /k pushd %1"
Standard User cheshire_man
(knowledge is power) Sun 29-Jul-12 13:02:05
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: Deadbeat] [link to this post]
 
In reply to a post by Deadbeat:
dir | clip will send the output of the "dir" command to the clipboard.
Thank you! I knew about piping and redirecting but didn't know you could pipe to the clipboard. Useful tip. cool

Tony
Standard User cavillas
(knowledge is power) Mon 30-Jul-12 19:36:36
Print Post

Re: How to copy text from CMD (command prompt) to the clipbo


[re: scopio] [link to this post]
 
Windows Powershell is much easier to use for all that stuff.

Alf
------------------------------------
smile IDNET Happiness Online smile
I am in no way employed or connected with IDnet other than as a customer.




There are 11 kinds of people, those who understand binary, those who don't and those who don't care.
Pages in this thread: 1 | 2 | (show all)   Print Thread

Jump to