Unlike a regular text editor, you can't the use standard keyboard shortcuts to select all, cut, copy, or paste (Ctrl+A / Ctrl+X / Ctrl+C / Ctrl+V) in the "DOS prompt" command line window in Windows 7. In fact, you can't cut text at all. But there are ways to achieve the same effect, using various tricks / shortcuts. The same holds true for PowerShell, another Microsoft command line tool.
To select text in PowerShell, you can drag to select, (nearly) like you can in a regular text editor. To select text in a DOS command prompt window, you have to select all - you can't be "selective" :) Right-click on the prompt window and choose "Select All" (or hit the S access key when the context menu opens). The background becomes white, and selected text shows up in black.
To copy, Ctrl+C won't work: that clears the selection and that's it! Right-clicking again goes nowhere either. Instead, click on the app icon to show the system menu (see screenshot), and go to Edit > Copy. Noticed the word "Enter" on the right of the copy command in the submenu? That's your keyboard shortcut to copy selected text in the Windows command line / PowerShell window.
In PowerShell, you can paste simply by right-clicking anywhere on the window: the text from your clipboard will automatically be inserted at the blinking insertion point. In the standard Windows command line, you can click on the DOS prompt icon and choose Edit > Paste - the bonus steps shows shortcuts.
Productivity shortcuts for "DOS" prompt (Windows command line):
- The quickest way to select all is to right-click and hit S. To do it with the keyboard only, hit Alt+Space: that's the universal hotkey to show a program's system menu. Then, hit E for Edit and S for Select all.
- To copy, hit Enter or Alt+Space, then E and C.
- To paste, hit Alt+Space, then E and P.