locked
File Sync - exclude and delete file RRS feed

  • Question

  • Hello,
    I have a problem with the Sync Framework in my application.

    I have a list of file that is shown to the user. He can select the files and / or folders he wants to synchronize. The synchronization is only one way from his computer to a remote.

    My problem is : How can I tell the Sync Framework that I don't want a particular file to be synchronize anymore. I've tried using the FileNameExclude.Add() method to do this but the file is not deleted from the remote. It will not be synced anymore but it's not delete if it have been synced before.

    Another problem. If I have 2 files with the same name, how can I use FileNameExclude.Add() to exclude one file but not the other one ? When I try to give a path before the filename, I have an error when running the application.

    And a last one : If I add a directory to SubDirectoryExcludes.Add(), it remove correctly the file in the remote directory that I don't want to sync anymore, but it don't delete the directory itself, even if it's empty.

    Is there any solution for my problems ? It seems that the framework is "incomplete" for what I want to do.

    I hope someone will be able to help me.
    Regards.

    Thursday, August 25, 2011 12:43 PM

All replies

  • Nobody can help me ?
    Is there something that I don't use correctly with the sync framework ?

    Thanks.

    Monday, August 29, 2011 8:25 AM
  • when you exclude an item, you're simply telling sync framework not to include that item in the change detection at the source. it does not interpret it as an instruction to remove the item from the destination nor is it an instruction to remove the item from the source.
    Tuesday, August 30, 2011 2:47 AM