ROBOCOPY: Copy files with ACLs

ROBOCOPY: Copy files with ACLs

robocopy 'D:\source' 'E:\target' /R:1 /w:0 /e /purge /zb /xo /copy:DATSO /v /log+:$LogFile /tee

/R – number of Retries on failed copies

/W – wait time between retries

/e – copy subdirectories, including Empty ones

/xo  – exclude older files

/copy: – what to copy for files

  • D – data, file itself
  • A – file attributes
  • T – time stamp
  • S – NTFS ACLs
  • O – file owner information

/v – verbose output, showing even skipped files and excluded files

/log+ – append status to log file

/tee – output to console window, as well as the log file