Microsoft 365 Blog: Updates & News

Why You Should Flatten Your Document Libraries

Written by Alex Henry | Jan 22, 2024 6:08:37 PM

 

What Does it Mean to 'Flatten' a Document Library?

When I say 'flatten' your document library, I'm referring to how your files and folders are organized.  In modern SharePoint (and all of Microsoft 365), flat architecture is the best way to structure sites and content to optimize it for things like search, avoiding file path limitations, and manually navigating content.

If you've been in your career for over ten years, first - where does the time go?  Second, you've probably worked with file servers at some point.  

File servers traditionally allowed for a hierarchical structure to organize files and folders.  Throughout this article, I will refer to this as a 'nested structure'.

Here is what a marketing department's setup might have looked like in a file server:

 

 

To flatten your file structure is to remove deeply nested folders and move content higher-up in the hierarchy.  The result is more folders at the root-level of your document library.

 

 

There's no question or secret that transitioning from a nested structure to a flat architecture takes time and effort.  However, the effort is worth the dividends.

Let's look at why we should be embracing the flat architecture life.

Access Content Faster in a Flat Architecture

How far are you willing to manually dig through folders to find a file before you give up?  If I need to dig through half a dozen folders to find an important file, I'm annoyed enough to just move the file to another location. 

 

 

Even Microsoft 365 search can struggle to get results from deeply nested folders.  Maybe not exactly because of the number of folders, but because of how they add to the length of the file path.  I'll get into why that's important soon.

Whether you're human or machine - content can be easier to find when it's not arbitrarily hidden in a half-dozen folders.

Sync Files Faster in a Flat Architecture

Are your staff members and colleagues constantly having issues with syncing files from SharePoint? 

One of the most common reasons I've seen this occur stems from the VOLUME of files the customer is trying to sync at once are pushing the limits of the OneDrive sync tool.

Someone who's recently had their entire department's files migrated from a network drive into SharePoint might try to sync the ENTIRE document library to their computer in order to replicate the experience of their old network drive. When their computer starts freezing up, the conversation usually goes something like this:

 

CUSTOMER: SharePoint is broken!  I've been trying to sync my files for the last several hours and it's frozen!

ME: Okay, it looks like you're syncing.... over 200,000 items onto your workstation. Okay, that's a lot.  What are you trying to sync?

CUSTOMER: I need to see all of the files from a folder in our document library

ME: Well, SharePoint doesn't work like a network drive and syncing this many files is weighing down your computer.

CUSTOMER: But I NEED access to all of these files!

ME: You regularly work on 200K different files every week?

CUSTOMER:  No, I only use these couple of files every week.

ME: Then let's sync the files you NEED, and I'll show you how to access the rest from the browser.

 

When you sync a folder from SharePoint, you're trying to sync EVERYTHING in that folder by default, including all sub-folders. While more savvy users may learn how to control which folders are synced - setting up a flat architecture in document libraries can help limit how large these folders get.

It also helps to teach users how to create  OneDrive Shortcuts for their most-used SharePoint folders rather than syncing the entire document library.  This is a topic for a future article.

 

Avoid File Path Limits with Flat Architecture

SharePoint (and therefore also OneDrive) have hard limits on how long a file path can be.  This means we need to be mindful of how deeply we nest files and folders, and mind how we name those files and folders.

For files that are only accessed via a web browser (i.e.: archived content), the limit is currently 400 characters (not counting your domain name):

 

 

Files that are synced to your computers will experience a tighter limitation of 256 characters, only excluding the drive name:

 

 

While we can't always control HOW staff name files and folders, we can help set them up for success with a flat folder structure.  

How to Reduce Nested Folders in Your Document Libraries

While we lack the tools to restructure a document library automatically, there are things you can do to identify risky folders and slowly flatten things out.

Identify Folders at Risk of Being Too Long

A simple place to start is to export your document library to an Excel file and review the file paths there.  Look in the table for anything that exceeds (or is at risk of exceeding) the file path character limits.

 

 

Once you know where the risks are, you can make decisions about what to keep, what to archive and what to restructure within the library.

Create Additional Document Libraries

By creating new document libraries within the same SharePoint site, you can break-down large file structures into smaller, flatter, and more secure libraries.

Here's what a multi-team document library might look like, where everyone shares the default document library (named 'Documents'):

 

Here's what it would look like after being broken in multiple document libraries:

 

 

The added benefit of using multiple document libraries is that you can manage permissions at the library (container) level, instead of at the folder level like we did with file servers.  As your organization navigates its own AI-readiness journey, using smaller, audience-focused document libraries will help ensure content isn't being over-shared.

Add Custom Fields to Your Document Libraries

Adding custom fields (metadata) to your document libraries is a powerful way to manage and organize files without folders. 

 

 

When accessing your document libraries from a web browser, you can organize your files by sorting, filtering and grouping your files together.  Combined with custom views, this can literally change how you look at your files moving forward.

Setup Live Templates in Orchestry with Flat Architecture in Mind

Set your organization up for success by applying these practices to your live templates in Orchestry.   Using live templates, you can customize the workspace document libraries to include custom folders, fields, views and more.

 

 

In conclusion, flattening your document library in SharePoint and embracing a flat architecture can greatly benefit your organization. It allows for faster access to content, eliminates syncing issues, and helps avoid file path limits.

By reducing nested folders and implementing custom fields and views, you can optimize your document libraries for efficiency and ease of use.

If you're looking for a better way to manage your Microsoft 365 tenant, reach out today and ask us how.