File Name and Path Limitations

3 min read Updated on December 1, 2024 Cloudiway Team

Overview

When migrating files to Microsoft 365 (OneDrive and SharePoint), you need to be aware of file name and path length limitations. These restrictions are imposed by Microsoft and apply to all files stored in SharePoint and OneDrive.

Quick Reference

File name: 200 characters max
Full path: 400 characters max

File Name Limits

The migration tool enforces a 200-character maximum for file names, including the file extension.

Example

Too Long (245 chars):
Very_Long_Report_Name_For_Quarterly_Financial_Summary_Including_All_Departments_And_Subsidiaries_With_Appendices_And_Supporting_Documentation_Fiscal_Year_2024_Final_Version_Approved_By_Board_Of_Directors.xlsx
Truncated (200 chars):
Very_Long_Report_Name_For_Quarterly_Financial_Summary_Including_All_Departments_And_Subsidiaries_With_Appendices_And_Supporting_Documentation_Fiscal_Year_2024_Final_Version_Approved_B.xlsx

Extension Preserved

When file names are truncated, the file extension is preserved to maintain functionality. Only the main file name is shortened.

File Path Limits

Complete file paths (folder structure plus filename) are capped at 400 characters. This includes:

  • The site or drive URL
  • All folder names in the path
  • The file name with extension
# Path length calculation
/sites/Company/Shared Documents/Folder1/Folder2/Folder3/Filename.docx
Total: 75 characters (well within limit)

Truncation Handling

When a file's path exceeds the 400-character limit, Cloudiway takes special action to ensure the file is still migrated:

zTruncated Folder

Files that exceed the path limit are placed in a special folder named zTruncated at the root of the target library. This ensures the file is migrated while remaining compliant with Office 365 restrictions.

After migration, you should:

  1. Review the contents of the zTruncated folder
  2. Reorganize files to their appropriate locations
  3. Shorten folder names or restructure as needed
  4. Delete the zTruncated folder once all files are relocated

Recommendations

To facilitate smoother migrations and avoid truncation issues:

Shorten File Names Before Migration

Review and reduce lengthy file names in the source before transferring data.

Simplify Folder Hierarchies

Reduce nesting depth and shorten folder names to minimize overall path lengths.

Run Path Analysis

Before migration, scan your source for files that may exceed limits and address them proactively.

Consider Target Structure

Plan your SharePoint site and library structure to minimize additional path length added by the target.

Microsoft Documentation

These limitations align with Microsoft's official guidelines for OneDrive and SharePoint. For the latest information, consult Microsoft's documentation on file and folder restrictions.

Was this article helpful?

Need more help? Contact our support team

We value your feedback

Help us improve your experience

What would you like to share with us?

Need direct support? Open a ticket