Should you separate your content into multiple document libraries, or simply use folders?
When you're creating a content structure in SharePoint Online, you have several options available to organise your files.
We've previously covered the debate around using subsites (short version: the general consensus is that because it's not recommended by Microsoft anymore for most content scenarios, you should do so very sparingly). For the majority of cases, this leaves us with the following containers as options:
- Site collections (also known as Team Sites in the modern flat topology)
- Document libraries
Site collections are top-level containers and as a result it's usually fairly obvious when they should be used. One level down however, it's sometimes not 100% clear whether to use a folder inside a document library to group content, or an entirely separately document library. What are the main differences?
Folders are very simple containers inside document libraries which you can only configure in two ways:
- By naming them.
- By setting their permissions - A folder can either inherit permissions from its parent, or have its own unique permissions.
Document libraries on the other hand have many more options in addition to the two above. Let's look at the most important ones.
Metadata in the form of columns and content types gives you the ability to tag your content (exception: you can't tag folders) and is configured at the document library level. Settings apply across all folders and subfolders in the library, so if you have documents unrelated to the metadata - or to completely different metadata - they need to be in a different library.
Custom templates to start new documents from are set at a document library level, so if you have two sets of information needing different templates, it's best to use two separate libraries instead of just two folders.
3. Sensitivity labels
Need to ensure that some documents are always only available to managers, regardless of who has been given permission to them? Or need to ensure that some documents cannot be shared externally? Sensitivity labels can help with this, but they cannot be applied to folders, only to document libraries (note: they can however be applied to individual files themselves).
4. Minor versioning, content approval and forced check-out
Enabling versioning used to be an important consideration in the on-premise SharePoint world due to storage limitations, but in SharePoint Online major versioning is enabled by default. This provides enough control in 95% of cases, but there is the odd scenario where the additional audit trail and pre-publishing offered by minor versioning can be useful. Versioning settings can only be changed at the document library level, so if a subset of your documents needs to have minor versions enabled, you'll need to put them in a separate document library.
5. Search visibility
You can switch on and off whether the contents of a document library appear in search, something you can't do with folders.
6. Audience targeting
Want to promote content to a defined audience such as an Office 365 or Azure AD group? You can enable targeting on a document library and then use the News or Highlighted Content web parts to selectively display its contents only to these people.
7. Information Rights Management
If you have compliance and data sensitivity requirements (and E5 licenses), you can use IRM to control and protect the contents of libraries. You can set policies to prevent people from printing documents, opening them in the browser, or even from copying and pasting content.
Quite a set of features, right?
This brings us to one of the most important considerations when deciding between document libraries and folders: Content volume. You can have up to 2,000 lists and libraries in a site, and up to 30 million files and folders in a library (details here), but it's important to remember:
- The SharePoint list view threshold makes it troublesome to view more than 5,000 items in a single view. This is seldom a problem if you use folders and your content is evenly distributed, but remember that you may in some instances want to view all items across all folders.
- Permission inheritance can't be broken on folders containing more than 100,000 items. If you're likely to exceed this volume, consider spreading your content across multiple libraries.