Copy (command)

Shell command for copying files


title: "Copy (command)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["internal-dos-commands", "msx-dos-commands", "os/2-commands", "reactos-commands", "windows-commands", "microcomputer-software", "microsoft-free-software", "windows-administration", "file-copy-utilities"] description: "Shell command for copying files" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Copy_(command)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Shell command for copying files ::

::data[format=table title="Infobox software"]

FieldValue
namecopy
screenshotReactOS-0.4.13 copy command 667x434.png
captionThe ReactOS copy command
developerDEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba
operating systemRT-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
genreCommand
licenseHDOS: PD
MS-DOS: MIT
PC-MOS: GPL v3
ReactOS: GPL v2
::

| name = copy | logo = | screenshot = ReactOS-0.4.13 copy command 667x434.png | screenshot size = | caption = The ReactOS copy command | developer = DEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba | released = | latest release version = | latest release date = | 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 | genre = Command | license = HDOS: PD MS-DOS: MIT PC-MOS: GPL v3 ReactOS: GPL v2 | website = copy is a shell command for copying files.

Different implementations provide various capabilities, such as:

  • Combining (concatenating) multiple files into a single file
  • If multiple source files are specified before the path to an existing directory, then files are copied to the directory
  • Support for text vs. binary data; for text, the command stops when it reaches an end-of-file (EOF) character; for binary, files are copied in their entirety, ignoring EOF
  • In DOS, a file can be copied to or from a device. For example, copy *path* con outputs the file at path to the console, and copy con *path* copies text typed at the console to a file at path

Implementations

The command is available in RT-11, OS/8,"Concise Command Language" (CCL).{{cite web|url=http://bitsavers.trailing-edge.com/pdf/dec/pdp8/os8/OS8_Handbook_Apr1974.pdf |title=OS/8 Handbook |date=April 1974 |access-date=28 November 2017}} RSX-11, ISIS-II, iRMX 86, TOPS-10, TOPS-20,{{cite web |url=http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf |title=TOPS-20 Command manual |access-date=2018-07-18 |archive-date=2020-08-09 |archive-url=https://web.archive.org/web/20200809103116/http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf |url-status=dead

Under IBM PC DOS/MS-DOS the command is available since version 1.

Some shells provide a copy command with a different name. In Unix-based systems, the copy command is [cp](cp-unix). In CP/M, the command is [PIP](peripheral-interchange-program). in OpenVOS, the command is copy_file.

DOS

The following copies existing file fromfile to path tofile.

copy fromfile tofile

A file can be copied to a device. The following sends a file to the printer on lpt1.

copy letter.txt lpt1

The following outputs to stdout, like the [type](type-dos-command) command.

copy letter.txt con

The following concatenates the page# files into book.txt like [cat](cat-unix).

copy page1.txt+page2.txt book.txt

The command can copy files between drives.

The following uses text mode to copy text of the file, stopping when it reaches an EOF character.

copy /a doc1.txt + doc2.txt doc3.txt copy /a *.txt doc3.txt

The following uses binary mode, concatenating files in their entirety and ignoring EOF characters.

copy /b image1.jpg + image2.jpg image3.jpg

References

References

  1. (11 September 2009). "Microsoft TechNet Copy article".
  2. (14 September 1988). "AmigaDOS quick reference". Grand Rapids, Mi : Abacus.
  3. "RT-11 HELP FILE".
  4. John F. Pieper. (1987). "RSX A Guide for Users". Digital Equipment Corporation.
  5. [http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf ISIS II Users Guide]
  6. "intel :: iRMX :: 146194-001 irmxR6Intro".
  7. (August 1980). "TOPS-10 Operating System Commands Manual". Digital Equipment Corporation.
  8. (December 2023). "OpenVMS User's Manual".
  9. "Operating manual".
  10. Heath Company. "Software Reference Manual HDOS SYSTEM Chapter 2 General Operations".
  11. "Z80-RIO OPERATING SYSTEM USER'S MANUAL".
  12. Paul S. Dayan. (1992). "The OS-9 Guru - 1 : The Facts". Galactic Industrial Limited.
  13. (1986). "FlexOS User's Guide".
  14. [https://archive.org/details/4690OSV6r2UsersGuide/page/n169]{{dead link. (September 2020)
  15. (2 January 2022). "roelandjansen/pcmos386v501".
  16. "MPE/iX Command Reference Manual".
  17. "OS/2 Commands: Copy".
  18. (3 February 2023). "copy".
  19. "Datalight ROM-DOS User's Guide".
  20. (3 January 2022). "reactos/reactos".
  21. (1980). "86-DOS - Disk Operating System for the 8086 - User's Manual". [[Seattle Computer Products, Inc.]].
  22. (2003). "Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition". [[Microsoft Press]].
  23. "OpenVOS Commands Reference Manual".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

internal-dos-commandsmsx-dos-commandsos/2-commandsreactos-commandswindows-commandsmicrocomputer-softwaremicrosoft-free-softwarewindows-administrationfile-copy-utilities