Pages

Friday, November 25, 2011

Tired of doing a print screen or a mark->copy on a DOS command box? Here’s a better way

To copy the contents of your screen to a text editor like notepad, you can perform the following command instead of copying the text one screen at a time:

C:\> <dos_command> | clip

For example, if you want to see all contents of the Program Files folder in your drive C:
  1. Select the Windows Start button, select Run and type “CMD” to launch a DOS session.
  2. Type C:\>dir "Program Files" | clip
  3. Open a text editor and press [Ctrl]V to paste the contents.
The clip command will copy the output results of the <dos_command> to your Windows clipboard. Once you are in your text editor, paste the text into a file. This command works in XP and Vista as well as the newer Windows Servers (Windows 2000 Server and Up).

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.