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.
ROBOCOPY won't have any problem with files or folders that have spaces in their names. The only ones that matter are the starting folders you use in the command line, if those contain spaces themselves then place them in double quotes. Since yours don't if you want to copy the folder tree just use E:\IT and F:\IT2.
/MIR makes the destination copy look exactly like the source folder tree, so if the destination already exists and has folders or files in it that are no longer in the source tree, they will be removed from the destination. Any updated or new files will also be copied from source to destination.
/E will copy all new or updated files and folders, but won't remove any files or folders in the destination that don't exist in the source.
/COPY and /COPYALL affect what to copy, as shown in the help:
Open in new window