We help IT Professionals succeed at work.
Get Started

Robocopy syntax

Last Modified: 2020-02-12
Hi all -

I need to migrate a large file share from one hard drive on my file server to another newly installed hard drive on the same file server.  My confusion and concern is 2-fold:

1.  This share has a ton of sub/sub-sub, etc, folders in it.  Some have no spaces in their names, but many DO have spaces in their names, so I'm struggling to figure out what the Robocopy syntax would be to migrate the whole share and account for this mix, without having to resort to doing each and every "main" subfolder in the root of the share one at a time.
2.   I've seen suggestions that incorporate the /MIR switch and suggestions that just do a "/E /CopyAll" without MIR.

The share is E:\IT and is an actual share and I want to copy it to F:\IT2, which is also an actual share with the same perms as the original E:\IT share.  Everything inside it is just a huge collection of non-shared, NTFS-secured folders, but with that usual mix of spaces and no-spaces in the names.

I have manually already created the new share, F:\IT2, shared it and set the share and NTFS perms to match E:\IT

Any guidance on what syntax I should use would be greatly appreciated.
Watch Question
System Administrator
Distinguished Expert 2020
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE