If you are using a public PC or sharing your Windows user account with some friend or family member, you might be interested in making sure that your clipboard (data which you have cut or copied) is empty after you leave your PC. This will ensure that you do not leave any private information in the clipboard. It is very easy to perform this operation without using any third party tool, as Windows includes all the necessary tools out of the box.
The classic way of copying data from the command prompt is the following:
- right click on the command prompt window title and choose Edit -> Mark command
- select the text inside the command prompt using the mouse
- to copy the selected text, right click on the command prompt window title and choose Edit->Copy command (or just press Enter on the keyboard).
If you have Quick Edit Mode enabled, then you can skip step 1 and directly drag to select and press Enter.
In Windows Vista, Microsoft has added a new way, which is quite handy and does not require so many clicks - the clip command. The clip command can accept the output of any console tools and send it to the Windows clipboard. Let's look how it can used with the following simple example.