locked
Initial files sync question. RRS feed

  • Question

  • Hello.

    I’m performing sync between local and network folders and my goal is to set network folders to be equal to local one, so I’m set agent direction to SyncDirectionOrder.Upload.  The problem raised only when I’m starting the sync for first (the metadata has not been created) and some files or folder exists on remote and does not exists on local folder , so I need them to be deleted, but sync only synchronize changed and copy new files, but does not delete remote unnecessary files.  

    Say I have local folder LocalFolder and remote folders RemoteA and RemoteB.

    Initial state

    LocalFolder files are: 1.txt,2.txt

    RemoteA files are: 3.txt

    RemoteB files are: 1.txt

     

    After sync:

    LocalFolder files are: 1.txt,2txt

    RemoteA files are: 3txt, 1.txt,2.txt

    RemoteB files are: 1.txt(updated),2.txt

     

    Required after sync

    LocalFolder files are: 1.txt,2txt

    RemoteA files are: 1.txt,2.txt (3.txt required to be deleted)

    RemoteB files are: 1.txt(updated),2.txt

     

    How can achieve this?

    Thanks in advance,

    Alex

    • Moved by Max Wang_1983 Wednesday, April 20, 2011 10:16 PM Forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Thursday, November 26, 2009 8:04 AM

Answers

  • Well since your localFolder has never seen 3.txt, it knows nothing about it and hence cannot send a delete.
    A few workarounds I can think of are:
    1. Create 3.txt on LocalFolder and then sync, then delete it and sync again
    2. Sync in both directions so that 3.txt comes to LocalFolder and then delete and sync.
    3. Maybe you can catch the event and delete un-needed files then. But then question is would you know what such files are.

    On a side note, do look at SyncToy 2.1, which enables synching files out of the box if files are the only things you synchronize and can use the SyncToy powertoy as is and not needing to create a specific provider with customizations.


    This posting is provided AS IS with no warranties, and confers no rights
    Friday, November 27, 2009 7:30 AM