Copy only changed files with xcopy /D

The built-in differential copy: /D:MM-DD-YYYY copies files changed on or after a date, or just newer than the destination.

WindowsbackupFilesxcopyLow risk
Run xcopy <src> <dst> /S /D:09-01-2026 to copy only files modified since September 1, 2026.

01Command

Command
$ xcopy C:\Proj\* D:\Backup\Proj\ /S /D:09-01-2026 /Y

02What it does

/D with no date compares timestamps and copies only files newer than their destination counterparts — rerunning the same command becomes an incremental backup for free. The date format follows your system locale (MM-DD-YYYY on US English systems), which is the classic gotcha. Add /C to continue past errors and /I to assume destination is a directory.

03Risk

RiskLow risk
!Warning: The /D date format depends on system locale — on many machines it's MM-DD-YYYY, and entering DD-MM will silently select the wrong day.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • xcopy | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents /D[:MM-DD-YYYY] to copy files changed on or after that date, /S for subdirectories, and /Y to suppress overwrite confirmation.
  • XCOPY - Windows CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 lists /D:m-d-y as copying files changed on or after the specified date, and /D alone as copying only newer files than the destination.

Last verified: 2026-09-17 · Category: Files & Folders

06Related solutions