locked
Setting source wins configuration with File Sync Provider RRS feed

  • Question

  •  

    I am developing a Sync solution to Sync the Source & Destination folders.

     

    Everything works good except that new files in the destination folder does not get updated with older files from source folder. It is my requirement to always overwrite the destination files with source files.

     

    I think this is the problem with conflict resolution.

     

    I am using FileSyncProvider object. Its Configuration property is bydefault set to Application mode for conflict resulution. I want to set it to SourceWins. But this property is readonly.

     

    Can you please suggest me how can I use SourceWins configuration with FileSyncProvider.

     

    Any help would be greatly appreciated.

     

    Thanks,

    Nilesh Patel

    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:06 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Friday, June 6, 2008 1:48 AM

Answers

  •  

    Hi Nilesh,

     

    FileSyncProvider uses hardcode conflict policy to resolve conflicts. For update-update conflict, it picks the one with newer last modification time as the winner. If you did no change the source file, or updated the destination file after the source file, source file will not overwrite the destination one during sync. You may want to touch the source file to increase its last modification time before the sync. Another way is to not modify destination files at all.

     

    Thanks,

    Dong 

    Tuesday, June 10, 2008 6:42 PM
    Moderator