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

OneDrive for Business Repair Screenshot

Image courtesy of Microsoft

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.

  1. Clear the Internet Explorer browsing history and temporary files.
  2. Stop syncing all OneDrive for Business libraries.
    1. Right-click on the OneDrive for Business icon in the system tray
    2. Click on ‘Stop syncing a folder…’
    3. Select a library and click ‘Stop Syncing’.  Repeat this until there are no libraries left.
  3. Move all folders that are left behind in your OneDrive for Business (SharePoint) folder into a backup folder, such as C:OneDriveBackup
  4. Close all your Office programs, such as Word, Excel, and PowerPoint
  5. 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
  6. Browse to the “C:UsersusernameAppDataLocalMicrosoftOfficeSpw” folder in File Explorer and delete everything in that folder.
  7. Browse to the “C:UsersusernameAppDataLocalMicrosoftOffice15.0OfficeFileCache” folder in File Explorer and delete everything in that folder.
  8. Start OneDrive for Business again
  9. 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.

Open Library with Explorer

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!

free-consultation

Complete the simple form below and a DevSoft Solutions associate will contact you to schedule a free 30 minute consultation.