Make available offline synchronisation issues
Had a problem over the last few days with Microsoft Windows “Make Available Offline” system. While sorting out this issue I learnt a few new things about Windows and thought I would share the experience here.

The problem that brought the user to our IT office was to do with some files appearing and vanishing on different days. Fortunately the share that the files where on was a personal drive that no one else had access too. The first thing that popped to mind was that there must be an issue with the synchronisation. First thing I tried was to force the offline folders to synchronise.
But during the sync there were errors with accessing some of the files. Now like my first thought you would possibly believe that this had something to do with security rights to the files. After looking at all security settings I found this not to be the case. But what was causing the problem is that these files were stored in directories that where several levels down from the route directory. Now what causes the problem is a base limit in the length of a path that Windows programs can use. So if a files full path (i.e. c:\mydocs\sams\file.txt) is made up of more than 255 characters the file is inaccessible.
To make sure that I did not lose any documents I had the user start copying files out of the network drive and onto his local laptop. When he found one of these long files he had to rename the directories above to something a bit smaller so that Windows could copy the file.
Once we had the files in a safe location it was time to tidy up. I logged into the server and deleted all files that where on the share. I went into the file options under Windows explorer tools menu. One of the tabs under folder options is Offline Files and a button there named delete all files. I then went to synchronise the offline folder believing all would be well. I found that the local pc had one of these long path files sitting in the local cache trying to update the server but would cause an error. All should have been fine as I deleted everything on both pc’s. At least that’s what I thought.
I spent some time over the next few days trying a few things out and not finding a solution until I came across this document and more importantly this section
“Deleting All the Offline Files and Folders in the Cache
You can delete all the offline files stored in the %systemroot%\CSC folder by using a process known as reinitializing the cache. This method deletes all offline files from the Offline Files Folder and resets the Offline Files database. If any files in the cache have changed and have not been synchronized with the network versions, the changes are lost when the cache is reinitialized. You must restart the computer after the cache is reinitialized.
To reinitialize the Offline Files cache
|
1. |
Click a folder, and then on the Tools menu, click Folder Options . |
|
2. |
Click the Offline Files tab. |
|
3. |
Press CTRL+SHIFT, and then click Delete Files . |
|
4. |
Restart the computer. |
”
I tried it and it reset everything and the user was able to start copying his files back. It’s my thoughts that it was the long path names that caused all the problems to begin with. But the solution above was just what I needed but why did Microsoft hide this feature? Hope this helps someone if they have a similar problem.
