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!

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

  1. Pingback: Something I learned today /  Outside the Fire

  2. James says:

    Thank you.
    This just saved me hours of work πŸ™‚

  3. Shane says:

    Thank you

  4. Unknownps says:

    robocopy E:\Home V:\ /e /z /SEC /xf * /lev:2
    this excludes sub directories

  5. Imran says:

    Just brilliant!

  6. Hi every one, here every one is sharing these experience, therefore it’s fastidious to read this webpage, and I used to visit this blog everyday.

  7. It’s really a great and helpful piece of information. I’m happy that you just shared this helpful information with us.
    Please keep us informed like this. Thank you for sharing.

  8. mike says:

    Awesome! It also saved me lots of time πŸ™‚ Cheers!

  9. Think about seeing a therapist or a psychologist. If your anxiety is based on stress that
    is affecting you in your life, it’s a good idea to see someone who is an expert in dealing with these issues. There are many professionals who specialize in anxiety and know specific steps that you can take to feel better.

  10. fend7k says:

    thanks bro. you save my day

  11. Trev Zeuq says:

    A quick Google search pointed me to this wonderful piece of information. Thanks for sharing, you’re the man!

  12. Czyczy says:

    Nicely done ma man!

  13. Awesome – quick and easy, once I’d realised you have to use a folder name as destination:
    eg: robocopy E:\sales F:\sales /e /z /SEC /xf *


  14. Pingback: Confluence: Intel Admin - Team

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: