Using Robocopy to copy directory structure and NTFS permissions (but not files)

I recently encountered a situation where I needed to copy a directory structure and folder permissions, but not the files contained within. To do this I used robocopy with the following syntax:

robocopy "source" "destination" /e /z /SEC /xf *

It worked like a charm!

Advertisements