Avatar of Thomas N
Thomas N
Flag for United States of America asked on

Robocopy question

Im running this robocopy command and I want to make sure it just copies the files over and keeps the files in both location. Is the command below okay? Also is there any switch that would delete the original location?

C:\>robocopy \\server1  \\server2 *.* /E /MIR /SEC /R:0 /W:1 /COPY:DATSO /LOG:c:\roboc
opy.log
Active DirectoryWindows Server 2008Windows OS

Avatar of undefined
Last Comment
zalazar

8/22/2022 - Mon
NVIT

> ... switch that would delete the original location
Use /MOVE to move files and dirs (delete from source after copying)

Also use /DCOPY:T to copy Directory Timestamps. Else it will have the current time

Good info here...
http://ss64.com/nt/robocopy.html
Thomas N

ASKER
So the command I have above should be okay right? It should keep at both locations? Thanks
NVIT

/MIR copies (mirrors) the source. So, Yes... A copy at both locations. Don't forget the /DCOPY:T switch, too.

To gain confidence, try the command on a test folder. It doesn't have to be lots of files. Just include some folders, too.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
zalazar

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.