We have SharePoint folders synced through OneDrive that are producing path length errors in File Explorer. If a file is under SharePoint's 400-character limit, does the local Windows path still matter? And will enabling LongPathsEnabled fix the sync errors?
How do path length limits work with SharePoint folders synced through OneDrive?
Answers
Yes, the local path matters too. A file can be within SharePoint's limit but still have trouble when the sync client builds a Windows path that includes the user profile, OneDrive root folder, and all the folders below it.
LongPathsEnabled is not a blanket fix. Windows applications need to support long paths, and the OneDrive sync client has its own path handling. Don't assume that switching the registry setting on will clear these errors.
Reply to this answer
I'd start by shortening folder and file names, especially any long names near the top of the synced path. A shorter local sync root can save a lot of characters across every file beneath it.
Check what can be changed in your setup before renaming anything. The source discussion suggests shortening the OneDrive root, but doesn't establish a reliable procedure for doing that.
Reply to this answer
There's another wrinkle if these are Office files. Excel has its own path length constraint, so a file that syncs successfully may still cause trouble when opened there. One suggestion is to keep paths below 218 characters as a more conservative target for Excel files.
Reply to this answer
Don't treat 260 as the only number to check. There are separate limits and behaviors in SharePoint, the sync client, Windows and individual apps. One response pointed to a 256-character limit as relevant to sync, so check Microsoft's current OneDrive and SharePoint restrictions documentation for the exact rules that apply to your setup.
Reply to this answer
Add your answer
Answers are reviewed before publication.
u.518+drumkey:
Check the full local path of an affected file, not just the part of the path inside the SharePoint library.