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
  • your example is what you want, or what happen when you run robocopy? – yagmoth555 Oct 18 '17 at 11:39
  • @yagmoth555 my example is what I want – rookie01 Oct 18 '17 at 11:49
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.