Do you feel like you are stuck in Sync Purgatory with OneDrive for Business because no matter what you do or try, you always seem to end up back where you started? Â You don’t have to use OneDrive for Business very long to realize that it just isn’t quite there yet in terms of being able to sync files with SharePoint without constant issues. Â I have yet to have a customer that doesn’t have at least one user with constant sync problems, and that user is typically the one that has a lot of documents and uses them often. Â In this blog post, I will try to help with some of the more common issues that I have run into while using OneDrive for Business in Office 365. Â Please feel free to add your additional experiences and fixes in the comments below! Â For additional information about the limitations and restrictions of using OneDrive for Business with SharePoint Online, go here.
Update OneDrive
Step 1 is to always run Windows Update and ensure that OneDrive for Business is up to date. Â Install any and all updates that are available and reboot, if necessary! Â Microsoft is constantly releasing updates to OneDrive and trying to improve it, so this is in your best interests!
Number of Files
This is a big one and it can be tricky to monitor/maintain. Â There a limits to the number of files that can be synced with a single library.
- You can sync up to 20,000 items in your personal OneDrive for Business library.
- You can sync up to 5,000 items per library in SharePoint Team Sites. Â This also includes syncing with other people’s OneDrive for Business libraries.
This is an important distinction to make when working with OneDrive for Business. Â Always check the number of items on the Site Contents page for each library that you are trying to sync.
Illegal Characters
The following characters CANNOT be used in the names of files that you want to save to SharePoint.
/
:
*
?
“
<
>
|
#
%
In addition, files that start with a tilde (~) cannot be synced. Â So how do you fix those problems? Â Just replace those characters with alternative characters. Â For example, replace every instance of the above characters with an underscore (_) or a dash (-).
Have a gazillion files with illegal characters? Â Use the following Powershell command to replace an illegal character with a legal character. Â Just open Powershell and change the directory to the base directory where your files are then run…
Dir -recurse | Get-ChildItem -Filter "ILLEGALCHAR" | % { Rename-Item -Path $_.PSPath -NewName $_.Name.replace("ILLEGALCHAR","NEWCHAR")}
 Before running it, replace ILLEGALCHAR in both places with the illegal character you want to search for and NEWCHAR with the character you want to replace it with.
Filename and Folder Length Limitations
Filenames – Maximum of 256 characters
Folders – Maximum of 250 characters (Notice that this leaves 6 characters for the filename and extension)
Folders + Filenames – Maximum of 256 characters combined
As you will notice, the full path, including the filename and extension can be no longer than 256 characters. Â This is a limitation of the design of SharePoint.
Opened Documents
Opened documents cannot be synced. Â Make sure you close out of your files when you are trying to sync. Â If you are still having issues, try rebooting just in case there is a process that has taken your file(s) hostage.
OneNote Documents are not Synced with OneDrive for Business
OneNote files have their own sync mechanism. Â They can’t be synced using OneDrive for Business. Â Do not save your OneNote files to a folder that is synced with SharePoint because it may cause errors and other problems!
Can I Sync a Folder in a Library instead of the entire Library?
Nope! Â You either sync the entire library or none of it, unfortunately.
How do I Repair OneDrive for Business?
There are 2 ways to repair OneDrive for Business…
Click ‘Repair’ in the OneDrive menu
Manually Clear the Cache
I prefer this method simply because I feel in control of the process. Â I typically start here and skip the automated repair, but you should do what you feel comfortable with.
- Clear the Internet Explorer browsing history and temporary files.
- Stop syncing all OneDrive for Business libraries.
- Right-click on the OneDrive for Business icon in the system tray
- Click on ‘Stop syncing a folder…’
- Select a library and click ‘Stop Syncing’. Â Repeat this until there are no libraries left.
- Move all folders that are left behind in your OneDrive for Business (SharePoint) folder into a backup folder, such as C:OneDriveBackup
- Close all your Office programs, such as Word, Excel, and PowerPoint
- Open Task Manager, go to the Processes tab and kill all Office related processes, such as groove.exe, msouc.exe, msosync.exe, winword.exe, excel.exe, and powerpnt.exe
- Browse to the “C:UsersusernameAppDataLocalMicrosoftOfficeSpw” folder in File Explorer and delete everything in that folder.
- Browse to the “C:UsersusernameAppDataLocalMicrosoftOffice15.0OfficeFileCache” folder in File Explorer and delete everything in that folder.
- Start OneDrive for Business again
- Re-sync all of the libraries
If everything goes well then OneDrive will sync everything without issue.
Forget OneDrive, just go direct!
There is another option here, and sometimes it is the preferred way to work with documents in SharePoint, and that is the ‘Open with Explorer’ option. Â Browse to your library in Internet Explorer (important!), then click on the Library tab at the top of the page. Â Look for and click on the ‘Open with Explorer’ button.
This will open the library you are currently looking at in Windows Explorer so you can work directly with the files and folders, just like they were local! Â Copy files in and out just like you would any other folder on your computer. Â Simple, right? Â For more information on this and for help with troubleshooting, check this article out.
I hope you have found this post to be helpful and I look forward to hearing feedback about your experiences with OneDrive for Business in the comments below!