You are not logged in.
Pages: 1
I need to write a Robocopy Script that will copy files and folders from one server share to the other. //Server 1\Public (Windows Server 2000) is the old file server share for a small office. //Server 2\Public (Windows Server 2003) is the new file sever share. To create //Server 2\Public i ran a Robocopy Script that mirrored //Server 1\Public to //server 2\Public. To make a long story short I had users on both \Public shares. I need a robocopy script that will copy newer versions of files plus lonely files and directories from //Server 1\Public to //Server 2 \Public without overwriting newer versions of files on //Server 2\Public or deleting extra files or directories that were created on //Server 2\Public.
Here is the robocopy script I came up with. I want to make sure this will work before running it.
Robocopy //Server 1\Public //Server 2\Public /S /COPYALL /XO /B /SEC
Thanks in advance for your help.
Anderist
Last edited by anderist (09 Nov 2007 01:41)
Offline
What if two users have updated the same file? - I would be reluctant to trust the last modified date as a reliable indicator of the best version to keep.
Running robocopy with the options you have above plus /L /LOG:file.txt /FP /TS will produce a log file without changing anything so you can see what will be overwritten in advance. This may become impractical if a very large number of files are involved.
A couple of other things -
1) make sure you have a good backup
2) Ensure none of the files are locked before running the bulk update by turning off the file shares.
Good luck
Offline
Thanks Simon,
I will run it with the /L switch to compare files and look at the changes. I don't think there will be an abundance of files to merge (hoping anyway). And yes I will have a good backup.
Anderist
Offline
Pages: 1