A document's file path includes includes the length of your document library name, folders, and the file. It does not count the characters in the site URL itself. Total file path length for documents is 400 characters when accessing files through the browser or directly through desktop apps.
If you use OneDrive to sync files locally, the file path limit is 259 characters.
Common error messages
Common error messages when attempting to open a document in the desktop app include:
- “We couldn’t register this document” error in Word
- “The file could not be accessed” error in Excel.
- "Cannot open this file because the file path exceeds 259 characters"
- Other times, this error may present as a blank document.
How to fix this error
Options include:
- Reduce the number of sub folders by pulling them up a couple of levels or by creating multiple document libraries (top level folder) to distribute the load so that they're not all under a single root folder (Team Documents)
- Shorten the folder and file names (i.e. if a file has a date or author's name in its title, remove it, as columns in the library already have this information)
- Instead of using folders to sort files, build out views based on metadata/columns
- A combination of these three methods