locked
using robocopy to copy folder structure only RRS feed

  • Question

  • Hello,

    I'm trying to do the equivalent of xcopy /t /e in robocopy.  That is, I only want to copy the folder tree, not the files themselves. 

    -Charlie

    Friday, July 29, 2011 4:54 PM

Answers

  • It looks like the  /e /xf * switches are what I want.  /e copies empty directories.  /xf * tells it to exclude all files.
    Friday, July 29, 2011 4:59 PM

All replies

  • It looks like the  /e /xf * switches are what I want.  /e copies empty directories.  /xf * tells it to exclude all files.
    Friday, July 29, 2011 4:59 PM
  • Glad to hear your issue has been solved.

     

    Regards,

    Leo   Huang

     

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, August 1, 2011 3:07 AM
  • Can you please help with something similar to this... need to copy the  empty directory structure but there a common sub folder in each of the folder...can copy that folder only along with directory structure ? 
    Wednesday, November 6, 2013 3:44 PM
  • to be more clear...

    robocopy only certain folders with directory structure

    Wednesday, November 6, 2013 3:51 PM
  • to be more clear...

    robocopy only certain folders with directory structure

    Instead of appending your question to two old and answered posts, you might want to create a post of your own and explain things in detail. You would get a much better response.
    Wednesday, November 6, 2013 7:14 PM
  • It just worked form me using 

    Robocopy <source> <destination> /E /XF *.*

    I only have folders no files.

    Monday, April 6, 2015 9:29 PM
  • Old Post, but I wanted to add:

    Use Robocopy but be sure to run CMD as administrator.  Once you do that, you have rights as a backup operator (in most cases).  

    robocopy <source> <destination> /zb /e /xf *

    /zb allows you access into the folders that you DON'T have permission to.  This will let you pull a complete folder structure even to the folders you haven't been granted permission to so that you don't have to mess with permissions to get this information.

    Thursday, September 28, 2017 7:53 PM