Developer(s) | DEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba |
---|---|
Operating system | RT-11, OS/8, RSX-11, ISIS-II, iRMX 86, TOPS-10, TOPS-20, OpenVMS, TRIPOS, HDOS, DOS, MSX-DOS, FlexOS, 4680 OS, 4690 OS, PC-MOS, Z80-RIO, OS-9, MPE/iX, OS/2, Windows, ReactOS, SymbOS, DexOS |
Type | Command |
License | HDOS:
PD MS-DOS: MIT PC-MOS: GPL v3 ReactOS: GPL v2 |
In
computing, copy
is a
command in various
operating systems. The command
copies computer files from one
directory to another.
[1]
[2]
Generally, the command copies files from one location to another. It is used to make copies of existing files, but can also be used to combine (concatenate) multiple files into target files. The destination defaults to the current
working directory. If multiple source files are indicated, the destination must be a directory, or an error will result. The command can copy in text mode or binary mode; in text mode, copy
will stop when it reaches the
EOF character; in binary mode, the files will be concatenated in their entirety, ignoring EOF characters.
Files may be copied to devices. For example, copy file con
outputs file to the screen console. Devices themselves may be copied to a destination file, for example, copy con file
takes the text typed into the console and puts it into FILE, stopping when
EOF (Ctrl+Z) is typed.
The command is available in DEC RT-11, [3] OS/8, [4] RSX-11, [5] Intel ISIS-II, [6] iRMX 86, [7] DEC TOPS-10, [8] TOPS-20, [9] OpenVMS, [10] MetaComCo TRIPOS, [11] Heath Company HDOS, [12] Zilog Z80-RIO, [13] Microware OS-9, [14] DOS, DR FlexOS, [15] IBM/ Toshiba 4690 OS, [16] TSL PC-MOS, [17] HP MPE/iX, [18] IBM OS/2, [19] Microsoft Windows, [20] Datalight ROM-DOS, [21] ReactOS, [22] SymbOS and DexOS.
The copy
command is supported by
Tim Paterson's
SCP
86-DOS.
[23] Under
IBM PC DOS/
MS-DOS it is available since version 1.
[24] A more advanced copy command is called
xcopy
.
The equivalent
Unix command is
cp
, the
CP/M command is
PIP
.
The command is analogous to the
Stratus
OpenVOS copy_file
command.
[25]
copy letter.txt [destination]
Files may be copied to
device files (e.g. copy letter.txt lpt1
sends the file to the
printer on lpt1. copy letter.txt con
would output to
stdout, like the
type
command. Note that copy page1.txt+page2.txt book.txt
will
concatenate the files and output them as book.txt
. Which is just like the
cat
command). It can also copy files between different disk drives.
There are two command-line switches to modify the behaviour when concatenating files:
copy /a doc1.txt + doc2.txt doc3.txt copy /a *.txt doc3.txt
copy /b image1.jpg + image2.jpg image3.jpg