Copy&Paste:Web Page to Windows WordPad
    Copy Paste Culture
    Copy cut paste activities
    Copy paste between dos and windows
    Copy and paste music code
    Copy and paste html code
    Copy paste between Jtables and excel
    Cmd copy paste
    copy paste x windows

    Link

Main
Useful copy/paste trick in CMD.EXE
Many people have trouble doing copy/paste in CMD.EXE. Indeed, there are no keyboard shortucts for this thing, and the selection of the text to copy can only be done through the mouse. You have to go to the system menu, select "Copy", then do your selection, press Enter, go again to the system menu, press "Paste", etc.

But there is a quick trick to do in CMD.EXE that can speed up copy/paste in many cases. If you don't know it yet, read on... Say that a tool outputs some text containing a "word" (i.e. a sequence of non-space characters). You want to copy this word as one of the parameters to the current cursor position, while you are editing the next command. The trick is surprisingly simple and it takes less than one second to master: move your mouse over that word, then double-left click, followed by double-right click. That's it.

How does this work? The first double-click on the left mouse button will select the word at the mouse cursor position. Then, the first right-click will do the "Copy" (since you do have some selected text). But the text becomes automatically deselected. Then, the next right click will Paste the selected text from the clipboard at the current cursor. In the end, double-left click plus double-right click does the job.

Warning: Note, however that you must have "Quick Edit" enabled. This facility is disabled by default, but you can enable it by opening the Properties dialog in the CMD.EXE system menu (Alt-space, select Properties), then go to the Options tab, and check "Quick Edit Mode". It migth be useful to repeat the same setting in the "Defaults" entry in the system menu such that every CMD.EXE window will have Quick Edit enabled from now on. And, if you prefer an equivalent command-line method of changing the Quick Edit default setting, here it is:

REG.EXE add HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
 

posted on Monday, December 27, 2004 6:24 PM

Feedback

# re: Useful copy/paste trick in CMD.EXE 12/27/2004 6:33 PM Michael Kaplan

Another trick to avoid the menus -- select the text and click <ENTER> to copy, then you can hit the right mouse button to paste it.

It also requires the "Quick Edit" mode to do the copying part.

# re: Useful copy/paste trick in CMD.EXE 12/27/2004 7:22 PM David Cumps

I always copy paste like this:

Right-click, select Mark. Select the text to be copied.
(I used to be able to just select stuff, but now I can't anymore :p)

Right-click (it's copied now)

Paste it anywhere you like (if it's in a prompt, right click paste works just as fast)

# re: Useful copy/paste trick in CMD.EXE 12/27/2004 8:30 PM Sahil Malik

I am very very used to

ALT+SPACE+E+K <-- for copy . and
ALT+SPACE+E+P <-- for paste.

Easy inuff !!

# re: Useful copy/paste trick in CMD.EXE 12/27/2004 8:36 PM Pavel Lebedinsky

> and the selection of the text to copy can only be done through the mouse

Not quite true. You can do Alt+Space, Edit | Mark, move the cursor with the arrow keys, hold down Shift to select.

# re: Useful copy/paste trick in CMD.EXE 12/27/2004 11:07 PM Jeff Atwood

> he selection of the text to copy can only be done through the mouse.

As stated above, not true.. ALT+SPACE, E, K, arrows, shift+arrows, enter. That gets the highlighted selection in the clipboard.

# re: Useful copy/paste trick in CMD.EXE 1/20/2005 10:39 PM Joku

With quickedit enabled, you can do even better:

Select while LMB is down, then right click copies and second right click pastes..

But the REAL issue & question of eternity is, how can I copy a traceroute output intact (not word wrapper) from cmd window, without resizing the width to accommodate the text. Currently I have to paste it to notepad and manually fix the line endings by deleting the unnecessary crlf's.

# re: Useful copy/paste trick in CMD.EXE 1/20/2005 10:40 PM Joku

Oh.. And second question.. Why is the quickedit disabled by default? I have not yet found good reason for this.

# re: Useful copy/paste trick in CMD.EXE 1/21/2005 7:16 PM Adi Oltean

>>> But the REAL issue & question of eternity is, how can I copy a traceroute output intact (not word wrapper) from cmd window, without resizing the width to accommodate the text. Currently I have to paste it to notepad and manually fix the line endings by deleting the unnecessary crlf's.

Probably you can simply output the traceroute output into a text file? Or, if you need only certain columns to be isolated, you can use the FOR command.
 

.