Copy and Paste with the Command Prompt

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

Copy and Paste with the Command Prompt

  • Comments 5

Keyboard:  ENTER (copy)
Menu:  System Menu -> Edit -> [Mark, Copy, Paste, Select All]
Versions:  2008,2010
Published:  7/21/2010
Code:  vstipTool0057

 

Pasting

There is a pretty rich set of tools to help you work with text in the command prompt windows.  For example, you can copy text and paste it by going to System Menu -> Edit -> Paste:

image

 

 

 

If you have a folder or file path you want to use you can always find the folder/file in Windows Explorer and CLICK AND DRAG the item to the command prompt:

image

 

It will paste the full path to the folder/file in the window:

image

 

 

Copying

You can copy text from the command prompt by first marking the text by going to System Menu -> Edit -> Mark:

image

 

Highlight the text you want by clicking and dragging over the text you want:

image

 

If you want, you can always go to System Menu -> Edit -> Select All:

image

 

Press ENTER to copy the text to the clipboard and then paste where you want.

 

 

QuickEdit Mode

If this seems tedious to you then you can always enable QuickEdit mode by going to System Menu -> Properties -> Options Tab -> Edit Options and enable "QuickEdit Mode":

image

 

Now you can simply use your mouse at any time to select some text as the Mark option is always enabled via CLICK AND DRAG:

image

 

RIGHT CLICK or ENTER to copy any selected text and then RIGHT CLICK again to paste at the current cursor location:

image

  • It still blows my mind that the Edit-menu features in the command-prompt are so user-unfriendly.  They do not conform to any of the existing standards (Ctrl-C, Ctrl-V, etc.) and require navigation through two levels of menu to reach.  The necessity of selecting "Mark" before you can even highlight text is painful too.  And, perhaps worst of all, clicking the mouse with your aim off by a few pixels when going to the Edit menu will close the console window entirely.

    Don't get me wrong; I'm glad it's *possible* to use copy and paste in the command-prompt.  I just find it incredibly frustrating how unfriendly the functionality is.

  • I completely agree with Cory. The current menu-driven copy-paste scenario is painful beyond belief. Could somebody please explain why the prompts doesn't support CTRL+C/V?

  • How about mentioning you can go to properties from the system menu and check "QuickEdit Mode" on the Options tab?

    Then you can copy and paste just by right-clicking anywhere in the command window.

    It's amazing that the command window hasn't been improved at all. The developers that build the Windows OS use command windows all day long - they prefer it to win. explorer - and yet they don't see a need to improve it.

  • Wow!  I had no idea this post would generate such angst :)  Okay, I've pinged the Windows Team to see if I can get a general "WTF" question answered about the command prompt.  I like mj's idea of adding QuickEdit Mode info so I'll update the post to reflect that info.  And, after some digging, found what appears to be a popular replacement--Console2.  It can be found here:  sourceforge.net/.../console  Obvisoulsy you try it at your own risk but if anyone does try it let me know your thoughts.

    Z

  • I thought I would add a couple fo links for those who want to use PowerShell.  These may help get folks started:

    stackoverflow.com/.../how-i-can-use-powershell-with-the-visual-studio-2010-command-prompt

    www.wintellect.com/.../updated-powershell-script-for-setting-your-symbol-paths.aspx

Page 1 of 1 (5 items)
Leave a Comment
  • Please add 4 and 4 and type the answer here:
  • Post