Friday 27 February 2015

Copying files and folders while retaining the security permissions

You can make use of RoboCopy to accomplish this:
robocopy <source-directory> <destination-directory> /W:2 /MIR /SEC /FFT /R:3
/W:2 Specifies the wait time while attempting to access a file.

/R:3 Specifies how many times to attempt to access a file - for example if the file was locked RoboCopy would retry the copy operation.

/MIR Creates an exact mirror of the files and folders.

/SEC Copies the exact NTFS permissions of the files and folders.


Post a Comment