Jump to content

copy (command)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ghettoblaster (talk | contribs) at 13:00, 7 May 2008 (Created page with '{{Refimprove|date=April 2008}}{{lowercase}} In computing, '''<code>copy</code>''' is a command in RT-11, RSX-11, OpenVMS, [[...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computing, copy is a command in RT-11, RSX-11, OpenVMS, DOS, OS/2 and Microsoft Windows operating systems. The command copies files from one location to another. The destination defaults to the current directory. If multiple source files are indicated, the destination must be a directory, or an error will result. The equivalent Unix command is cp.

Example

copy filespec [destination]

Files may be copied to devices (e.g. copy file lpt1 would send the file to the printer on lpt1. copy file con would output to screen, which would be the same as type. Most useful to note that copy file.txt+file2.txt file_cat.txt will concatenate the files and output them as file_cat.txt. Which is just like the cat command.

When using this command to concatenate files there are two switches to modify its behaviour:

copy /a alpha.txt + beta.txt gamma.txt

Text mode - which will copy the text content of the file, stopping when it reaches the EOF character.

copy /b alpha.mpg + beta.mpg gamma.mpg

Binary mode - which will concatenate files in their entirety, ignoring EOF characters.

See also

References