Folder synch

Posted on 2006-04-04
Last Modified: 2010-04-03
here is the situation.

1. Computer A has a folder on it named SWL
2. Someone tried to use an xcopy script to copy folder SWL to computer B.
3. However, it did not work as they intended and now there are files on computer A that did not make it to Computer B.
4. In the mean time users have been using the copy of SWL on computer B for all their work.

How do i synchronize the two folders on two seperate machines without overwriting any data on computer B's SWL folder and making sure that files that dont exist on computer B get moved over from SWL on computer A.

Question by:itmstech
    LVL 9

    Expert Comment

    Arrr, that fantastic method of data migration !!!

    Well, you could manually check each folder and see what has changed? Use Last Accessed Date and delete anything that has not changed after your copy date. (DIR /s /OD or use something like FileSize Pro 3 or even Explorer).

    Alternatively, you could start your copy off again, but using something like RoboCopy which will let you do more explicit copy commands.

    Finally, you can use a reverse copy of all changed files first, then copy everything back again.

    XCOPY B:\SWL /S /D:12-01-2006 A:\SWL

    where A: is server A drive
    B: is server B drive
    SWL is folder
    12-01-2006 is the date which you performed the original copy.

    This assumes that noone is making changes to the files on Server A of course. If so, then you would need to copy to a seperate location to ensure data integrity.

    Then, do your copy back again. Make sure you use continue on failure, and event logging so you can see what you missed.

    XCOPY A:\SWL B:\SWL /E /H /R /C /O /K /Y /F >c:\copy.log

    XCOPY /? to see what all the switches are but this should work. One minor point....


    A good way to ensure noone does anything while you perform your network copy is to

    1. ensure no open files (close any that are open)
    2. ENsure noone is connected to computer other than you, and your destination computer
    3. PAUSE the NETLOGON service to stop any more logins. Don't stop it or else you won't be able to do anything else.
    4. Perform your copy
    5. restart NETLOGON and test

    Hope this helps
    LVL 87

    Accepted Solution

    use robocopy, it is much better than xcopy. There is a doc file with all the help you need and by entering robocopy /? you also get a lot of info about the syntax. Robocopy is free and part of the resource kit tools.
    LVL 15

    Expert Comment

    I agree with Rindi about using Robocopy. If you want a nice GUI for syncing the files, I can recommend some shareware from Fileware called Filesync -
    LVL 15

    Assisted Solution

    Just to help Rindi's comment, look at this link : " "

    Best Regards !
    LVL 1

    Expert Comment

    SyncToy 1.2 has just been released by Microsoft.  It has a nice straight forward user interface and gives you numerous options as to how you syncronise the folders.  It is perfect for this one off task, i expect you can also schedule regular syncronises too!

    For example:  copy everything from A to B, overwriting only newer files

    Hope this helps

    Author Comment

    Thank you for your help, Robocopy worked well and the additional information on ss64 page was helpful.

    Just for everyone's knowledge, you will have to download the tools to a 2003 or xp machine and then bring the tool over to the windows 2k machine.
    LVL 15

    Expert Comment

    Thanks for your additional input !

    Best Regards !
    LVL 87

    Expert Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Problem description :  Some external hard disks / USB flash drives do not show actual space as mentioned in the factory settings. This is a common problem when you use an 8 GB USB drive to make it bootable to install a firmware/ driver on a serv…
    I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
    This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now