xcopy
Windows CMD · Files · available in the simulator
What it does
Copies files and directory trees.
Syntax
xcopy origen [destino] [opciones]
Options and parameters
/ECopies directories and subdirectories, including empty ones.
xcopy src dest /E /I/SCopies subdirectories, except empty ones.
/IIf destination does not exist and copying multiple files, assumes destination is a directory.
/YSuppresses prompting to confirm overwriting an existing destination file.
/-YPrompts to confirm overwriting an existing destination file.
/QSuppresses the display of file names while copying.
/FDisplays full source and destination file names while copying.
/LDisplays the files that would be copied without actually copying them.
/HCopies hidden and system files as well.
/ROverwrites read-only files.
/TCopies the directory structure without copying files.
/UCopies only files that already exist in the destination.
/KRetains read-only attributes on copied files.
/DCopies only files modified on or after the specified date, or newer than destination files.
xcopy src dest /D:01-01-2026/ACopies only files with the archive attribute set, without resetting it.
/MCopies files with the archive attribute set and turns off the archive attribute.
/CContinues copying even if errors occur.
/WPrompts you to press a key before copying begins.
/PPrompts for confirmation before creating each destination file.
/ZCopies networked files in restartable mode.
/JCopies using unbuffered I/O; useful for very large files.
/BCopies the symbolic link instead of the target file.
/GAllows copying encrypted files to a destination that does not support encryption.
/EXCLUDEExcludes files listed in the specified files.
xcopy src dest /E /EXCLUDE:lista.txt
Usage examples
xcopy src dest /E /Ixcopy *.txt backup /S /Yxcopy src dest /D:01-01-2026xcopy src dest /E /EXCLUDE:lista.txt