|Developer(s)||Microsoft, IBM, DR, Datalight, Novell, Rene Ableidinger, ReactOS Contributors|
|Initial release||1986, 34–35 years ago|
|Operating system||MS-DOS, PC DOS, MSX-DOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR DOS, ROM-DOS, FreeDOS, ReactOS|
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.
While still included in Windows 10,
XCOPY has been deprecated in favor of
robocopy, a more powerful copy tool, which is now supplied with the Microsoft Windows Server and Desktop operating systems.
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 command and Hyper-V Live Migration with SMB.
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"
XCOPY fails with an "insufficient memory" error when the path plus filename is longer than 254 characters. Use Robocopy instead – which seems to be the optimal solution. 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
XCOPY does not support the Windows Volume Shadow Copy 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 or xcopy installation is a software application's installation into a Microsoft Windows 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. 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, InnoSetup, or NSIS) are used to help coordinate these relatively complex operations.
- List of file copying software
- List of DOS commands
- Peripheral Interchange Program
- Software deployment
- "Windows NT File System Files". Microsoft Help and Support. Microsoft. 2006-11-01.
- Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
- Pietrek, Matt (2007-01-16). "Robocopy built into Vista". Under The Hood (an MSDN blog).
- DR DOS 6.0 User Guide Optimisation and Configuration Tips
- "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
- Smith, Russell (27 November 2020). "SMB Compression Lowers Bandwidth and Improves Copy Times in Windows Server and Azure". Petri.
- Output from
xcopy /?in Windows 10 includes "/COMPRESS - Request network compression during file transfer where applicable".
- Maciak, Luke (2007-02-05). "Xcopy: Insufficient Memory".
- "Technet: Xcopy". 2019-05-01.
- Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738.
- Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714.
- John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0470165799.
|Wikibooks has a book on the topic of: Guide to Windows Commands|
- 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 also 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