Is there a way to retain files/directories in the destination directory while still Mirroring the source directory
Source ---
A.txt
B.txt
Destination ---
Z.txt
Run robocopy
Destination ---
A.txt
B.txt
Z.txt
batch-filerobocopywindows
Is there a way to retain files/directories in the destination directory while still Mirroring the source directory
Source ---
A.txt
B.txt
Destination ---
Z.txt
Run robocopy
Destination ---
A.txt
B.txt
Z.txt
Best Answer
You want to not use any options that include or imply the
/purge
flag (notably/mir
). Just use/e
https://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx#Mirror_directory_excl_deletion
Server 2012, 2016 docs:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy#BKMK_remarks