In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
,
XCOPY
is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
* ...
used on
IBM PC DOS
IBM PC DOS, an acronym for IBM Personal Computer Disk Operating System, is a discontinued disk operating system for IBM PC compatibles. It was manufactured and sold by IBM from the early 1980s into the 2000s. Developed by Microsoft, it was also ...
,
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
, IBM
OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
,
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
,
FreeDOS
FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running Legacy system, legacy software and supporting embedded system ...
,
ReactOS
ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
, and related operating systems for copying multiple
files or entire directory trees from one
directory
Directory may refer to:
* Directory (computing), or folder, a file system structure in which to store computer files
* Directory (OpenVMS command)
* Directory service, a software application for organizing information about a computer network's u ...
to another and for copying files across a
network
Network, networking and networked may refer to:
Science and technology
* Network theory, the study of graphs as a representation of relations between discrete objects
* Network science, an academic field that studies complex networks
Mathematics
...
.
Overview
XCOPY
stands for ''extended copy'', and was created as a more functional file copying utility than the
copy
Copy may refer to:
*Copying or the product of copying (including the plural "copies"); the duplication of information or an artifact
**Cut, copy and paste, a method of reproducing text or other data in computing
**File copying
**Photocopying, a pr ...
command found in earlier operating systems.
XCOPY
first appeared in DOS 3.2.
While still included in
Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct successor to Windows 8.1, which was released nearly two years earlier. It was released to manufacturing on July 15, 2015, and later to retail on J ...
,
XCOPY
has been
deprecated
In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing ...
in favor of
robocopy
Robocopy, for "Robust File Copy", is a command-line directory and/or file replication command for Microsoft Windows. Robocopy functionally replaces Xcopy, with more options. Created by Kevin Allen and first released as part of the Windows NT 4.0 ...
, a more powerful copy tool, which is now supplied with the Microsoft Windows
Server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
and Desktop operating systems.
DR DOS 6.0
DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
[DR DOS 6.0 User Guide Optimisation and Configuration Tips](_blank)
/ref> and Datalight
Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and is headquartered in Bothell, Washi ...
ROM-DOS
Datalight was a privately held software company specializing in power failsafe and high performance software for preserving data integrity in embedded systems. The company was founded in 1983 by Roy Sherrill, and is headquartered in Bothell, Washi ...
include an implementation of the command.
The FreeDOS
FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running Legacy system, legacy software and supporting embedded system ...
version was developed by Rene Ableidinger and is licensed under the GPL
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
.
J. Edmeades developed the Wine
Wine is an alcoholic drink typically made from fermented grapes. Yeast consumes the sugar in the grapes and converts it to ethanol and carbon dioxide, releasing heat in the process. Different varieties of grapes and strains of yeasts are m ...
-compatible version that is included in ReactOS
ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
. It is licensed under the LGPL
The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
.
Compression
Since Windows Server 2019 and Windows 10, a compression
option is available in xcopy
when copying across a network. With this switch, if the destination computer supports SMB compression and the files being copied are very compressible, there may be significant improvements to performance. The SMB compression adds inline whitespace compression to file transfers. Compression is also available with the robocopy
Robocopy, for "Robust File Copy", is a command-line directory and/or file replication command for Microsoft Windows. Robocopy functionally replaces Xcopy, with more options. Created by Kevin Allen and first released as part of the Windows NT 4.0 ...
command and Hyper-V
Microsoft Hyper-V, codenamed Viridian, and briefly known before its release as Windows Server Virtualization, is a native hypervisor; it can create virtual machines on x86-64 systems running Windows. Starting with Windows 8, Hyper-V superseded Win ...
Live Migration
Live migration refers to the process of moving a running virtual machine (VM) or application between different physical machines without disconnecting the client or application. Memory, storage, and network connectivity of the virtual machine are ...
with SMB.
Example
Create a new directory by copying all contents of the existing directory, including any files or subdirectories having the ''hidden'' or ''system'' attributes and empty directories.
xcopy e:\existing e:\newcopy /e /i /h
If the pathnames include spaces, they must be enclosed in quotation marks.
xcopy "D:\Documents and Settings\MY.USERNAME\My Documents\*" "E:\MYBACKUP\My Documents\" /D/E/C/Y
Copy entire drive in to a mapped network drive while ignoring any errors in network restartable mode.
xcopy *.* z:\Netmirror /E /V /C /F /H /Y /Z 1>out.txt 2>err.txt
Copy a single file without prompt if it is a file or a directory
cmd /c echo F , xcopy "c:\directory 1\myfile" "c:\directory 2\myfile"
Limitations
XCOPY
fails with an "insufficient memory" error when the path plus filename is longer than 254 characters. An option "/J" copies files without buffering;
moving very large files without the option (available only after Server 2008R2) can consume all available RAM on a system.
No open files
XCOPY
will not copy open files. Any process may open files for exclusive read access by withholding the FILE_SHARE_READ
https://msdn.microsoft.com/en-us/library/aa363858.aspx
XCOPY
does not support the Windows Volume Shadow Copy
Shadow Copy (also known as Volume Snapshot Service, Volume Shadow Copy Service or VSS) is a technology included in Microsoft Windows that can create backup copies or snapshots of computer files or volumes, even when they are in use. It is imple ...
service which effectively allows processes to have access to open files, so it is not useful for backing up live operating system volumes.
XCOPY deployment
XCOPY deployment or xcopy installation is a software application's installation into a Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
system simply by copying files. The name is derived from the XCOPY
command line facility provided by Microsoft operating systems.
In contrast, the installation of a typical Windows application will require a significant number of additional steps before the application is ready to be used. Most of this additional work involves, directly or indirectly, adding or modifying entries in the Windows Registry
The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and use ...
. Even when an application uses ordinary files for its own data, many common facilities provided by Windows require some type of ''registration'' step before they are available to programs. Usually, one or more specialized tools (such as Windows Installer
Windows Installer (msiexec.exe, previously known as Microsoft Installer, codename Darwin) is a software component and application programming interface (API) of Microsoft Windows used for the installation, maintenance, and removal of software. ...
, InnoSetup
Inno Setup is a free software script-driven installation system created in Delphi by Jordan Russell. The first version was released in 1997.
History
Since Jordan Russell wasn't satisfied with InstallShield Express which he had received upon purc ...
, or NSIS) are used to help coordinate these relatively complex operations.
See also
*List of file copying software
This article provides a list of inbuilt and third party file copying and moving software - utilities and other software used, as part of computer file management, to explicitly move and copy files and other data on demand from one location to an ...
*List of DOS commands
This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list.
In DOS, many standard system commands were pro ...
*Peripheral Interchange Program
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 subse ...
*Software deployment
Software deployment is all of the activities that make a software system available for use.
The general deployment process consists of several interrelated activities with possible transitions between them. These activities can occur on the S ...
References
Further reading
*
*
*
External links
xcopy , Microsoft Docs
Switches That You Can Use with Xcopy and Xcopy32 Commands
Windows 95, Windows 98, Windows Me
Xcopy
Microsoft Windows XP
VariableGHz article depicting CRC errors and XCOPY as a solution
XCOPY Command in a post build event does not execute
XP_CMDSHELL Does Not Work with XCOPY
*See als
Microsoft Product Documentation
How to deploy an ASP.NET Web application using Xcopy deployment
.NET Development: Determining When to Use Windows Installer Versus XCOPY
Visual C++ How to: Deploy using XCopy
{{Windows commands
External DOS commands
File copy utilities
MSX-DOS commands
OS/2 commands
ReactOS commands