Filename Limits and Invalid Characters in OneDrive and SharePoint

Summary

OneDrive and SharePoint have specific filename restrictions that prevent syncing issues, upload failures, and access problems. Following these rules ensures files work correctly across Microsoft 365 services.

Prerequisites

  • Active UTHSC NetID and password
  • Access to OneDrive or SharePoint
  • Files stored in Microsoft 365 services

Instructions

Invalid Characters

The following characters cannot be used in OneDrive or SharePoint filenames:

  • \ / : * ? " < > | # %

Invalid File Endings

Filenames cannot end with:

  • A period (.)
  • A space

Reserved Names

The following names cannot be used as filenames, even with an extension:

  • CON
  • PRN
  • AUX
  • NUL
  • COM1, COM2, COM3, etc.
  • LPT1, LPT2, LPT3, etc.

Maximum Path Length

OneDrive and SharePoint support a maximum path length of 400 characters. This includes:

  • Site name
  • Library name
  • Folder names
  • Filename

Best Practices

  • Use short, descriptive filenames.
  • Avoid deep folder nesting.
  • Remove special characters before uploading or syncing.
  • Rename files locally if OneDrive sync reports an error.

Troubleshooting

  • Sync errors: Rename the file to remove invalid characters or shorten the path.
  • Upload failures: Check for restricted characters or trailing spaces.
  • File not appearing in Teams: Teams uses SharePoint storage, so filename rules still apply.
  • Cannot rename: Ensure the file is not open or locked by another user.

Additional Notes

  • These restrictions apply across OneDrive, SharePoint, and Teams.
  • Fixing filename issues often resolves sync problems immediately.
  • Microsoft may update restrictions over time; follow current guidelines when errors occur.

Related Articles

Print Article

Related Articles (3)

SharePoint is a suite of tools that allow for online collaboration including file sharing, data storage and retrieval, and workflow processes.
Install and manage the installations of your Microsoft Office software
OneDrive is an Internet-based storage platform with a significant amount of space offered at no cost to you.