Copy (command)

Last updated

copy
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]

Contents

Overview

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.

Implementations

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]

Example for DOS

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

See also

Related Research Articles

cd (command) Computer command in various operating systems

The cd command, also known as chdir, is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.

dir (command) Directory information command on various operating systems

In computing, dir (directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal command in the command-line interpreter (shell). On some systems, a more graphical representation of the directory structure can be displayed using the tree command.

mkdir Directory creation command on various operating systems

The mkdir command in the Unix, DOS, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, Windows and ReactOS, the command is often abbreviated to md.

Peripheral Interchange Program (PIP) was a utility to transfer files on and between devices on Digital Equipment Corporation's computers. It was first implemented on the PDP-6 architecture by Harrison "Dit" Morse early in the 1960s. It was subsequently implemented for DEC's operating systems for PDP-10, PDP-11, and PDP-8 architectures. In the 1970s and 1980s Digital Research implemented PIP on CP/M and MP/M.

<span class="mw-page-title-main">XCOPY</span> Computing command

In computing, XCOPY is a command used on IBM PC DOS, MS-DOS, IBM OS/2, Microsoft Windows, FreeDOS, ReactOS, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network.

exit (command) Command of many operating system command line interpreters and scripting languages

In computing, exit is a command used in many operating system command-line shells and scripting languages.

more (command) Terminal pager available on various operating systems

In computing, more is a command to view the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

In computing, tee is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.

<span class="mw-page-title-main">Debug (command)</span> Line-oriented debug utility in DOS

The line-oriented debugger DEBUG.EXE is an external command in operating systems such as DOS, OS/2 and Windows.

<span class="mw-page-title-main">ATTRIB</span>

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.

ren (command)

In computing, ren is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, 4NT and Windows PowerShell. It is used to rename computer files and in some implementations also directories. It is analogous to the Unix mv command. However, unlike mv, ren cannot be used to move files, as a new directory for the destination file may not be used. Alternatively, move may be used if available. On versions of MS-DOS that do not support the move command, the user would simply copy the file to a new destination, and then delete the original file. A notable exception to this rule is DOSBox, in which ren may be used to move a file, since move is not supported.

<span class="mw-page-title-main">TYPE (DOS command)</span>

In computing, type is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell used to display the contents of specified files on the computer terminal. The analogous Unix command is cat.

del (command) Command in various operating systems

In computing, del is a command in command-line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS, NDOS, 4OS2, 4NT and Windows PowerShell. It is used to delete one or more files or directories from a file system.

ver (command) Command in many command-line interpreters

In computing, ver is a command in various command-line interpreters (shells) such as COMMAND.COM, cmd.exe and 4DOS/4NT. It prints the name and version of the operating system, the command shell, or in some implementations the version of other commands. It is roughly equivalent to the Unix command uname.

<span class="mw-page-title-main">PRINT (command)</span> Computing command

In computing, the print command provides single-user print spooling capability in a number of operating systems. It is roughly similar to that provided by the UNIX System V lp and BSD lpr print spooler systems.

find (Windows)

In computing, find is a command in the command-line interpreters (shells) of a number of operating systems. It is used to search for a specific text string in a file or files. The command sends the specified lines to the standard output device.

help (command) Command in various command line shells

In computing, help is a command in various command line shells such as COMMAND.COM, cmd.exe, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.

format (command)

In computing, format, a command-line utility that carries out disk formatting. It is a component of various operating systems, including 86-DOS, MS-DOS, IBM PC DOS and OS/2, Microsoft Windows and ReactOS.

choice (command)

In computing, choice is a command that allows for batch files to prompt the user to select one item from a set of single-character choices. It is available in a number of operating system command-line shells.

start (command) Shell command

In computing, start is a command of the IBM OS/2, Microsoft Windows and ReactOS command-line interpreter cmd.exe to start programs or batch files or to open files or directories using the default program. start is not available as a standalone program. The underlying Win32 API is ShellExecute.

References

  1. "Microsoft TechNet Copy article". 2009-09-11.
  2. Rügheimer, Hannes; Spanik, Christian (1988-09-14). AmigaDOS quick reference. Grand Rapids, Mi : Abacus. ISBN   9781557550491 via Internet Archive.
  3. "RT-11 HELP FILE". paleoferrosaurus.com.
  4. "Concise Command Language" (CCL). "OS/8 Handbook" (PDF). April 1974. Retrieved 2017-11-28.
  5. John F. Pieper (1987). RSX A Guide for Users (PDF). Digital Equipment Corporation. ISBN   0-932376-90-8 . Retrieved 2020-09-19.
  6. ISIS II Users Guide
  7. "intel :: iRMX :: 146194-001 irmxR6Intro" via Internet Archive.
  8. TOPS-10 Operating System Commands Manual (PDF). Digital Equipment Corporation. August 1980. Retrieved 2019-02-17.
  9. "TOPS-20 Command manual" (PDF).
  10. "OpenVMS User's Manual". www.itec.suny.edu.
  11. "Operating manual" (PDF). www.pagetable.com. Retrieved 2020-09-14.
  12. Heath Company. "Software Reference Manual HDOS SYSTEM Chapter 2 General Operations" (PDF). Retrieved 2020-02-08.
  13. Z80-RIO OPERATING SYSTEM USER'S MANUAL
  14. Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN   0-9519228-0-7.
  15. "FlexOS User's Guide" (PDF). www.bitsavers.org. 1986. Retrieved 2020-09-14.
  16. [ dead link ]
  17. "roelandjansen/pcmos386v501". GitHub. 2022-01-02.
  18. MPE/iX Command Reference Manual
  19. "OS/2 Commands: Copy". Archived from the original on 2019-04-14. Retrieved 2019-07-20.
  20. "copy". docs.microsoft.com. 2023-02-03.
  21. "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
  22. "reactos/reactos". GitHub. 2022-01-03.
  23. 86-DOS - Disk Operating System for the 8086 - User's Manual (PDF). Version 0.3 (Preliminary ed.). Seattle, Washington, USA: Seattle Computer Products, Inc. 1980. Archived from the original (PDF) on 2019-07-14. Retrieved 2019-07-14. (59 pages)
  24. Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN   0-7356-1812-7.
  25. "OpenVOS Commands Reference Manual" (PDF). stratadoc.stratus.com. Retrieved 2020-09-14.

Further reading