Created
November 1, 2022 01:09
-
-
Save c3rberus/a2a808a748f8d082e4f22cb814c84ece to your computer and use it in GitHub Desktop.
Robocopy Mirroring Directory and Permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To do a mirror operation and properly copy the file and folder permissions, use the /sec and /secfix commands. The /sec command will copy the file security over for changed files, while the /secfix command will update the security for unchanged files. | |
#By combining these commands with /mir you will effectively mirror all of the files, folders, and permissions from a source directory to a destination. | |
robocopy D:\Source\ D:\Destination /mir /sec /secfix /v /log:copy.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment