Mikko Kortelainen

Differential Xcopy parameters

I always forget what the correct options for the Windows xcopy command are when I simply want to synchronize one directory over another one, so that only changed files are overwritten. To do it well, you need to remember too many options. And robocopy is never installed when you need it.

Here it is:

xcopy /keychord source destination

The options:

/k copy attributes
/e be recursive, and even re-create empty directories
/y say yes to prompts
/c don't stop on errors
/h copy hidden and system files
/o copy ownership and ACL information
/r overwrite read-only files
/d copy only changed files (or new files)

Just remember, "Key Chord"