I am sure anyone that has been using OneDrive for Business has come up against sync errors. To be honest I have more than I’d like but talking to my customers I am not alone.
So recently I had one particular library that if I created a folder on the PC it wouldn’t sync it to SharePoint, instead ODfB would just sit in syncing until the cows came home…they didn’t. I did what any normal person would do and I stopped the syncing of that library and try to re-sync is….. “a-ha” says ODfB “you can’t fool me, you’ve tried to get me to sync that before” … and I am then greeted with the good old ODfB error 0x80040201.
How to fix? well you just need to do the following….however before you do just be informed that this process will break all your sync’s. You’ll need to re-sync your libraries and if you’ve made changes to files on your PC that didn’t sync up then you’ll need to find those and upload them to SharePoint again. To make this task a little easier on big libraries I use WinMerge.
Are you ready?
- First off you need to close all your Office applications including OneDrive for Business. Just be aware that ODfB will try and restart so keep an eye on that task bar and kill it if it raises it’s little head.
- Navigate to “c:\users\USERNAME\appdata\Local\Microsoft\Office\Spw” and delete all the contents of this folder. If you get a file lock then it is most likely ODfB has started it’s self back up…kill it!
- Now go to “c:\users\USERNAME\appdata\Local\Microsoft\Office\15.0\OfficeFileCache” (if you are using Office 2016 you’ll need to go to c:\users\USERNAME\appdata\Local\Microsoft\Office\16.0\OfficeFileCache)
- Select all the files apart from the two Access Database files and delete them. If you’ve upgraded from Office 2013 it is also worth checking “c:\users\USERNAME\appdata\Local\Microsoft\Office\15.0\OfficeFileCache” and deleting the files from there….not saying it makes a difference but my OCD makes me tidy everythinig!
- Now go to “c:\users\USERNAME\SharePoint” which is the default location for the ODfB SharePoint library sync
- Rename all the folders, add a -OLD or something just so they are different.
- Now go to your SharePoint site and re-sync the library
- Once sync’d you just need to sort out the old folders to make sure you copy any files that weren’t sync’d into SharePoint.
Hopefully all will be well in the world again and ODfB will work as expected.
Hope this helps.