- Copy (command)
In
computing ,copy
is a command inRT-11 ,RSX-11 ,OpenVMS ,DOS ,OS/2 andMicrosoft Windows operating system s. The command copiescomputer file s from one directory to another. The destination defaults to the currentworking directory . If more than one source file is indicated, the destination must be a directory. The equivalentUnix command iscp
.Example
copy "letter.txt" ["destination"]
Files may be copied to
device file s (e.g.copy letter.txt lpt1
sends the file to the printer on lpt1.copy letter.txt con
would output tostdout , like thetype
command. Note thatcopy page1.txt+page2.txt book.txt
will concatenate the files and output them asbook.txt
. Which is just like thecat
command.There are two command-line switches to modify the behaviour when concatenating files:
* "Text mode" - This copies the text content of the file, stopping when it reaches the EOF character.
copy /a doc1.txt + doc2.txt doc3.txt
* "Binary mode" - This concatenates files in their entirety, ignoring EOF characters.
copy /b image1.jpg+ image2.jpg image3.jpg
ee also
*
List of DOS commands
*List of Unix programs
*Peripheral Interchange Program References
* [http://technet.microsoft.com/en-us/library/bb490886.aspx Microsoft TechNet Copy article]
Wikimedia Foundation. 2010.