XCOPY

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

XCOPY
The ReactOS xcopy command
Developer(s)Microsoft, IBM, DR, Datalight, Novell, Rene Ableidinger, ReactOS Contributors
Initial release1986, 3334 years ago
Operating systemMS-DOS, PC DOS, MSX-DOS, SISNE plus, OS/2, Windows, DR DOS, ROM-DOS, FreeDOS, ReactOS
TypeCommand
LicenseFreeDOS: GPL
ReactOS: LGPL
Websitedocs.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy 

Overview

XCOPY stands for extended copy,[5] and was created as a more functional file copying utility than the copy command found in earlier operating systems. XCOPY first appeared in DOS 3.2.[6]

While still included in Windows 10, XCOPY has been deprecated in favor of robocopy, a more powerful copy tool, which is now built into the Microsoft Windows Server and Desktop operating systems.[7]

DR DOS 6.0[8] and Datalight ROM-DOS[9] include an implementation of the XCOPY command.

The FreeDOS version was developed by Rene Ableidinger and is licensed under the GPL.[10]

J. Edmeades developed the Wine-compatible version that is included in ReactOS. It is licensed under the LGPL.[11]

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 directory names include blank signs (spaces), the names can be put 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[12] and moving large files without the "/J" option (available only after Server 2008R2) can consume all available RAM on a system.[13]

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

The Windows Volume Shadow Copy service is used for such situations, but XCOPY does not use it. Therefore, XCOPY 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 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.

gollark: Well, mine is better due to its use of webhooks.
gollark: Oh, another bot has this.
gollark: HUh?
gollark: Basically:- someone configures a channel as the "phone channel"- people can then dial that, or you can dial to other ones in it- if the other end accepts, a call is set up and messages are relayed between each channel until you hang up
gollark: You can use the very cool™ and useful™ feature of my Discord bot where you can open temporary "calls" to channels on other (participating) servers.

See also

References

Further reading

  • 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.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.