Skip to main content
< All Articles

Sync folder vs. Sync Library in SharePoint and OneDrive

Posted on March 22, 2023
SharePoint

I documented the mechanism of OneDrive Sync quite extensively on my blog previously. However, one thing I did not mention before was the difference between syncing the whole library vs. just a folder within a document library. So in this article, I want to explore what will happen when you Sync a folder instead of a document library and some unexpected consequences that might occur.

What is OneDrive Sync?

If you are wondering what I am talking about, please check out this post, where I explain in great detail OneDrive Sync and how it works.

Syncfoldersynclibrary1

OneDrive Sync of a Document Library

When you sync the whole document Library (which is probably the most common occurrence), by clicking the Sync button at a library level, it syncs the entire document library to your PC, all the folders and subfolders inside of it.

Sync folder vs. Sync Library

Syncing the entire library from SharePoint

Syncfoldersynclibrary3

This is how the synchronized document library appears on the PC

The naming convention for the synchronized library on your computer is “Site Name – Document Library Name.” For example, in my case, it is HR Team – Documents, where HR Team is the site name and Documents is the name of a document library.

OneDrive Sync of a folder within a document library

If, instead, you decide to sync just a specific folder from your SharePoint site, by clicking the button at a folder level, it will only synchronize that folder and everything inside.

Syncfoldersynclibrary4

Syncing a specific folder from SharePoint

Sync folder vs. Sync Library

This is how the synchronized folder appears on the PC

The naming convention for the synchronized folders on your computer is “Site Name – Folder Name.” For example, in my case, it is HR Team – Clients, where HR Team is the site name and Clients is the name of a folder within the Documents library.

Syncing a folder and a library together – unintended consequences

Since nothing stops you from clicking the Sync button at both folder and library levels, I want to highlight a few unintended consequences that might occur as a result.

Scenario 1: Sync the document library first, then sync a folder

In case you sync the library first and then decide to sync the folder inside of that library – nothing will really happen. Since you are already syncing the entire library, clicking the Sync button at a folder level won’t do anything extra. So all is good in this case.

Scenario 2: Sync the folder first, then sync the entire document library

If you do this in the opposite order, this will lead to potential confusion for the users and even possible loss of information/track of changes. This only occurs when you disable Files On-Demand – in other words, physically download the files and folders on your PC.

Syncfoldersynclibrary6

Here is an issue:

  1. In the example below, I have a document library with a few folders insideSyncfoldersynclibrary7
  2. I then sync one of the folders first (the Clients folder in my case). It syncs it onto my PC and makes it available from Windows Explorer (as expected).Sync folder vs. Sync Library
  3.  I then click the Sync button on the entire document library. At this point, it syncs the entire document library with all of its subfolders inside to Windows Explorer, but simultaneously, it stops the sync of the folder I synchronized previously. Syncfoldersynclibrary9
  4. It does not remove the folder from Windows Explorer. It just leaves it in place and synchronizes a document library next to it. It does remove the “green checkbox” over the folder, indicating that the folder is no longer synchronized to SharePoint. However, if the user continues to access files in that folder or update them, none of those changes will make it to the cloud! 😠
  5. So to summarize, if you sync any folders first and then decide to synchronize the entire document library, you must immediately delete the folder from your PC to avoid confusion and possible data loss.

Alternatives to folder syncing

So the best practice to avoid the above-described headache would be to sync the entire libraries and not sync folders.

If you do need to sync just a certain folder or set of folders and not the entire library, I highly recommend syncing the entire library, but then doing the selective sync. I described it in this article.

Syncfoldersynclibrary1

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?