How to map folder names to SharePoint metadata columns with ShareGate

Sharepoint Image Featured 17

Wondering about the benefits of SharePoint folders vs. metadata when it comes to search and document management? We explain why metadata in a SharePoint document library enhances functionality and user experience. Then we walk you through how to map folder names to SharePoint metadata columns using ShareGate. 

Configuring SharePoint metadata is often overlooked, yet it plays a crucial role in modern SharePoint document management. Properly structured metadata fields improve SharePoint search, enhance information architecture, and make it easier to locate files within a SharePoint document library. 

With ShareGate, you can easily export  existing metadata from your SharePoint document library to an Excel sheet, enabling admins to bulk edit metadata fields. ShareGate even suggests potential metadata, streamlining workflows and improving document management in Microsoft 365. Helping you leverage the power of properly-configured metadata is just one way that ShareGate can help you simplify your SharePoint administration routine

Product Migration Image

15 days of full access to ShareGate—Try now!

Explore all our powerful features—no credit card required—and see how we can help your projects.


SharePoint folder name vs metadata

For a long, long time, metadata wasn’t the norm, which had users resort to other stratagems to identify their files. 

Some people may recognize that kind of complex folder hierarchy here: 

File System Folder Hierarchy before migration

Without metadata, folders were, and still are, a great way to describe the purpose of the files they contain.  However, this method becomes redundant once you transition to SharePoint, which offers a robust feature called “Metadata.” Folders are no longer needed! Yeah! 

A common question is: How can I assign folder names to metadata fields in a SharePoint document library? Instead of manually assigning metadata to each file, ShareGate simplifies the process by allowing you to map folder names to metadata columns automatically, reducing duplication and improving document management. 


SharePoint Online folder metadata: Use case

Let’s explore a real-world use case. Imagine a folder hierarchy representing Country, State, and City, where each document belongs to a specific location.

Instead of relying on subfolders, metadata columns in a SharePoint site offer a more scalable approach to information organization. 

Original Folder hierarchy in Excel

In SharePoint, I’ve set up a document library with three metadata fields: Country, State, and City. This structure replaces the traditional file system with a more flexible and efficient metadata-driven approach. 

Destination Document Library

If you download ShareGate and use the Copy SharePoint content feature in the Copy tab, you’ll be able to select your folder hierarchy and click on the Excel export functionality (the Export metadata button): 

Export metadata button.

The exported file will let you fill in the SharePoint metadata manually for all your documents. ShareGate suggests potential metadata at the end of each row that can be massively applied as metadata with basic Excel formulas. 

Here’s what the suggested metadata will look like: 

Suggested Metadata in Excel

You get:

  1. The file or folder name
  2. The parent folder name
  3. Every part of the full file path

You still want to fill in the “Country” values. To do so, just put the formula =IF(R3>0,R3,””) and apply it to all rows. Don’t forget the IF condition when referring to another cell if you don’t want to get a zero instead of a blank cell. 

Map Folder Names to SharePoint Columns

You then re-apply the same process to the “State” and “City” columns. Once complete, just re-import the Excel sheet using ShareGate, and your metadata will be applied instantly—enhancing SharePoint’s functionality and helping end users find files quickly. 

Here’s the end result in SharePoint: 

Destination Document Library after migration

With metadata, you get the flexibility of subcategories without the limitations of a rigid folder structure. SharePoint metadata fields allow for better content organization, improved search functionality, and integration with Power Automate for automated workflows. ShareGate also lets you bulk-edit SharePoint metadata once your files are in SharePoint or Office 365. 


If you haven’t tried our popular SharePoint administration tool yet, what are you waiting for? ShareGate’s UI isn’t just simple and intuitive—it’s actually pleasant to use (really!). 

Migrate to SharePoint Online or Microsoft 365 seamlessly with unlimited data transfers, improved permissions management, and integration with Microsoft Teams. With ShareGate, you can effortlessly restructure your SharePoint site while maintaining metadata integrity. 

Save time and migrate with total peace of mind, then get back to business as usual. See for yourself with a free, full-featured 15-day trial. 

Recommended by our team

Your biggest Microsoft 365 jobs, made easy

15-day full-featured trial—no strings, no credit card.

Spot Icon

Smooth Google migration  Migrate from Google Drive to M365 the right way