MS-DOS Commands :: paste

Overview:

The paste command pastes text from the Windows Clipboard to any command's input. You can thus take some text from a Windows application and use it as input into some command.

Note: The paste command is not a standard part of MS-DOS. See paste.exe Availability below.

Tip: paste | sort | clip takes the Windows Clipboard, sorts it, and copies it back to the Windows Clipboard. Requires: clip

paste.exe Availability:

Joel 'Jaykul' Bennett (HuddledMasses.org) is a C# programmer who wrote his own custom paste program (see paste.cs C# source code).

Follow these steps to install the paste.exe command program:

  1. Download paste.zip and unzip it to get paste.exe

  2. Put paste.exe in c:\windows directory or in any other directory that is in your path.

Command Variations:

paste | command

Paste the contents of the Windows Clipboard into the input of the specified command command.

paste | command | clip

Paste the contents of the Windows Clipboard into the input of the specified command command then copy its output to the Windows Clipboard.

For example, paste | sort | clip sorts the contents of the Windows Clipboard. Requires: clip

paste > filename

Pastes the contents of the Windows Clipboard into the specified filename file.

paste | sort > filename

Sorts the contents of the Windows Clipboard and saves sorted output to the specified filename file.

Related Commands:

clip
Copy command output to Windows clipboard.