Robocopy and the /MIR parm

In using Robocopy I would like to use the /MIR parm.  I wanted to make sure I understood the effect of this parm before using it.


I am anticipating that this command will copy all files and subdirectories to the folder ABSFILER_DATAPACK and that subsequent running of this command will refresh the files and subfolders under ABSFILER_DATAPACK so that they are an exact copy of F: at the time the command was run.

The primary thing I want assurance on is this:  We have other folders on \\NASHABS-NAS01\DATAPACK besides \ABSFILER_DATAPACK.  I do not want to impact these other folders at all.  I just want to affect the stuff stored under \ABSFILER_DATAPACK.

This command will be running under a Windows 2000 Server OS and copying files to a Windows 2003 NAS.

Thanks,  Rich
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.

Set up a fake directory tree with fake files and try it out.
Yes, that will do what you want; the ABSFILER_DATAPACK folder will be an exact replica of the F: drive.
And you need to separate the arguments with spaces; the above will end in a parameter error; use it like this:
You might want to reduce the waiting time to 1 second (or even 0), and the retries can probably be lowered as well, assuming \\NASHABS-NAS01 can be reached through a reliable LAN connection. Otherwise, if a file is open and can't be accessed at the moment, robocopy will try for 150 seconds just for this single file, and probably won't be able to copy it anyway. The retry/wait options are more useful for unreliable links.

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
za_mkhIT ManagerCommented:
Robocopy does not accept things such *.*

So your command would be like this
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

please run at least "robocopy /?" before making bold statements like yours:
              Usage :: ROBOCOPY source destination [file [file]...] [options]

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               file :: File(s) to copy  (names/wildcards: default is "*.*").

Not to mention that the /S in your line is not necessary, as /S is a subset of /E:
               /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
za_mkhIT ManagerCommented:

Firstly my apologies. To be fair, I was at home and didn't have access to RoboCopy even though I do use it extensively with the mirror option.  But at one stage Robocopy never allowed *.* . I think it was NT4 version  and as a result I've always never used it like that! I guess I should RTFM

Apologies once again.
I think that was even in the NT4 version; the syntax always required source and destination folders as the (mandatory) first two arguments (unless used with /nodd or /nosd), and any arguments following without switch would be considered files or file masks to copy.
In fact, it even "inserts" *.* into the command line by itself if no files are specified.

C:\>robocopy c:\test c:\temp /l
   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
  Started : Fri Feb 08 00:18:28 2008
   Source : c:\test\
     Dest : c:\temp\
    Files : *.*
  Options : *.* /L /COPY:DAT /R:1000000 /W:30

Open in new window

RichNHAuthor Commented:
Thank you all for the feedback.  I have to state that I LOVE ROBOCOPY!  
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
Windows XP

From novice to tech pro — start learning today.