Carbon copy like Sync... or exact copy to and existing folder. RRS feed

  • Question

  • I would like to do a sync between our server and our local desktops where even if the local copy changed i want to overwrite it. and also if it's not on the server it should be deleted from the local machine. this is because we have a preexisting folder on the users machine that one of the applications we use gets its information. but we keep a central repository and have the users sync this when we've made changes. problem i'm running into at this time is that since the files already exist, when i start a new sync, it doesn't remove files on the local machine that don't exist on the server. now after i've run thru the sync once and it makes all it's metadata obviously new deletes are removed, but i want to avoid deleting everything from the users machine before i sync because it's literally GBs of data. so syncing only what needs to be synced would be ideal. my thought is it's not possible from what i see from the framework and i'm going to have to do a manual recusive scan of the local and remote directories and determine if things need to be removed from the local path and then run the sync possiblly....
    Wednesday, June 24, 2009 4:15 PM

All replies

  • Hey,

    Could you elaborate on your scenarios? Do you use your own custom provider or not? Do you want to delete the preexisting folder on the local machines after sync server with local machine? How do you get this folder back in the case you need? You might want to write your own provider which applies the changes from server, detects and deletes the local changes.

    Ann Tang
    Wednesday, June 24, 2009 6:51 PM
  • I'm not using a custom provider... i'll have to look that up... what i want to do is if a file is not present on the server, it shouldn't be present on the local machine, no need for backup. i just need in essence an exact replica of the server folders and files.

    also, now that i'm trying to install this on other peoples machines, it's saying it can't do something with the GAC "Retrieving the COM class factory for component with CLSID {Component CLSID} failed due to the following error: 80040154." is there a way to run the new sync framework without having to install to the GAC? i have like 50 non admin users that it would be nice to just have the click once on... this thing is making me mad!
    Thursday, June 25, 2009 5:18 PM
  • Hi there,

    For the first issue, if you are using the FileSyncProvider you cannot do that exactly without some extra trickery.  If you set up a one-way sync scenario with the FSP it will not delete new files created on the destination (local machine in your case), by design.

    If you looked here this scenario is discussed:

    It doesn't totally address your created file local machine that should be deleted scenario.  For that case you could sync local->server and don't apply creates/updates and delete the creates (and probably touch the files that shoudl have been updated).  And then sync back the deletes and updates.  Confusing, I know.  You might have better luck achieving this with either a custom provider or a completely different solution outside sync framework.

    As for your second question.  Yes it you can run your application without having the sync framework installed.  It requires the use of manifests and reg-free COM.  See here for more info:


    If you are interested in this, I can provide some manifest files to you that you can try out.  It's fairly straightforward.

    Thursday, June 25, 2009 8:43 PM
  • Awesome, thanks for the info! i'll have to keep that regestration free COM thing, i'm sure that will come in handy in the future. i ended up just making my own file and folder search and i just compare the dates and sizes of the files. i'm also doing a search for files that don't exist on the server and just deleting them.
    Tuesday, July 7, 2009 1:25 PM