0

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
rookie01
  • 3
  • 2

1 Answers1

0

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

quadruplebucky
  • 5,041
  • 18
  • 23