A sample script to copy files along with permissions using robocopy
robocopy \\<server>\<share> T:\<share> /COPYALL /ZB /R:2 /W:2 /E
- \\<server>\<share> – Provide the source location.
- T:\<share> – Provide the destination/target location where it’s being copied to.
- /COPYALL – Copy the shares and permissions
- /ZB – Restartable mode just in case if there is a network hiccup during copy intervals.
- /R:2 – the number of retries in case the file is in use or has a problem
- /W:2 – the number of seconds to wait between retries
- /E – Copy everything including subfolders and empty subfolders
(Visited 13 times, 1 visits today)