How to use robocopy to move a complete directory structure

I need to move several directory structures (500+ GB in space) from one location to another. It was suggested that I use robocopy to make the move. I've never used robocopy before. How to I use it to move a directory with all of its files and subdirectories from one location to another all while keeping the structure, attributes, security, etc in tact?

Not sure if this makes a difference but in most cases I will be moving the directories from a Windows Server 2008 R2 system to either another Windows Server 2008 R2 or Windows Server 2012 R2 system. In one particular case I will be moving directories from a Windows Server 2003 system to hopefully a Windows Server 2012 R2 system.
dowhatyoudo22Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
robocopy \\src\share\folder1 \\dst\share\parentfolder /Move /CopyAll /DCopy:DAT /R:2 /W:5

Open in new window

Will move all files and folders with all avaible information, retrying 3 times with 5 seconds delay between retries.
If you want to just keep an exact copy (e.g. for testing the operation), replace /Move with /Mir. Then the command can be repeated as often as you like, only changes will be transfered to the destination (including removal of files deleted between two runs).
0
JasonCommented:
robocopy <source> <destination> /mir /SEC /COPYALL /Z /W:0 /R:5 /MT:16
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JasonCommented:
I would do the /mir.  Moving can get messy and do the /sec for the permissions.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
/sec is the same as /copy:DATS, which is superseded by /copyall (= /copy:DATSOU)
0
FOXActive Directory/Exchange EngineerCommented:
Dow,
Go with JHIll's original command.  The /sec is not needed though. His /Mir and /copyall switches will copy the file structure , original timestamps, acl, security,attributes, etc.
0
Anand PandyaCommented:
In case if you find difficult to go with the command line, Microsoft had also introduced earlier Robocopy GUI tool which you go download through the below link:
https://techjourney.net/microsoft-robocopy-gui-free-download/
I think it has now been discontinued by Microsoft.
After downloading the setup from above website you can extract it run and Utility Spotlight folder will be created on C: drive (or as suggested path by you) then click inside that folder and run the setup by .exe or .msi file and you will have GUI version.
Then you just need to go through few switches to understand what they mean and then use it in your data transfer.
You can test it my moving some amount of data, if it fits you can move other chunk of data.
All the best !! Hope it resolves your issue :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.