Robocopy One-Way Sync
I think my command is wrong.
I only want to do a oneway sync from c:\SmarterMail\Domains
tp \\My.IP.Add.Ress\C$\SmarterMail\Domains
My current command is this:
robocopy /E /S /MIR /Z /W:1 /R:1 /MIR \\My.IP.Add.Ress\C$\SmarterMail\Domains C:\SmarterMail\Domains
But... the more I read, it looks like this may be a two-way mirroring? What command do I need just to do the one-way sync?
Solution 1:
As per the documentation the syntax is as follows:
robocopy <Source> <Destination> [<File>[ ...]] [<Options>]
There's a few oddities with your script:
- /S copies subdirectories (but not empty ones) /E copies subdirectories including empty ones. /E implies /S so you can drop the /S
- However /Mir is described thusly "Mirrors a directory tree (equivalent to /e plus /purge)" So you can drop both the /E and the /S
- You've included the /Mir option twice? Unnecessary
- Main Issue - you've got the source and destination the wrong way round...
So the command should be
robocopy /MIR /Z /W:1 /R:1 C:\SmarterMail\Domains \\My.IP.Add.Ress\C$\SmarterMail\Domains