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!

About these ads

12 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!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: