Proposed Syncing offline files

  • Friday, August 03, 2012 8:06 PM
     
     

    I configured my Windows 7 machine(machine 2) for offline file synchronization to synchronize content from network shares.

    I created a share(testshare) on machine 1(it is windows 7 as well) and have one structured storage file(name: a.ext) in that share. I connected to the share(via mapped network drive) from machine 2, right click on the share (say V: drive) and set to "Always available offline". The file is synced and I can see the file a.ext in the Sync Center.

    In my application, I programmatically do the following:

    a)I access this network file a.ext on share, Open the root storage(LPSTORAGE) for write access and then make changes to the root storage and then commit to disk.

    b)Created a new structured storage file(b.ext) in the %temp% folder on my machine 2. Open the root storage for write access, and then copied the storage content using api IStorage::CopyTo() (from a.ext to b.ext) and then committed the storage to disk. This step is purely to compress the file on disk.

    c)Now, I deleted file a.ext via call DeleteFile() api and then used MoveFile() api to move the b.ext file to a.ext file so that the compressed file is saved to disk.

    The issue is:Sometimes I see the a.ext file at the shared network location updating immediately and sometimes the file a.ext is missing but I can see the file when I click on View my offline files from Sync center. The shared network file SHOULD always update immediately when the network is UP/online.

All Replies