Robocopy will ensure that all NTFS attributes (security rights, etc) will be copied and can restart a copy if the network connection is disrupted.
It can be downloaded from Microsoft in the Windows Server 2003 Resource Kit.
Be aware that if you delete a file in the source folder, this process will also delete it in the mirrored folder when it runs.
————————————-
REM
REM Uses ROBOCOPY, which is from the Windows 2003 Server Resource Kit
REM Flags are:
REM /MIR – Mirrors filesystem including creating directories or deleting files no longer in source.
REM /LOG+: – Appends a LOG file listing the files mirrored or deleted.
REM
REM
“C:\Program Files\Windows Resource Kits\Tools\robocopy.exe” “\\machinename\sourcefolder” “\\machinename\mirrorfolder” /MIR /LOG+:”C:\copylogs\copy.log.txt”