RESOURCES · MICROSOFT 365 & OUTLOOK

"The file path is more than
259 characters" in OneDrive?

OneDrive flags a file with a red cross and tells you the path is more than 259 characters, so it won't sync. It's not a bug — it's a decades-old Windows limit, and the fix is usually just shorter names or a slightly flatter folder structure.

Applies to: OneDrive · SharePoint sync Time: ~10 minutes Level: Anyone
Quick answer

Windows limits a full path to 260 characters. Shorten long file and folder names, or move the folder closer to the top so the whole path fits. For SharePoint, sync a subfolder instead of the entire library.

WHY IT HAPPENS

The whole path counts, not just the file name.

When OneDrive syncs, it lays the files out in a local folder on your PC, and Windows measures the full path — the site or drive, every nested folder name in between, and the file name — all added together. That total can't go past Windows' long-standing 260-character limit. Deeply nested SharePoint libraries with long, descriptive folder names blow past it quickly, and once a path is too long, OneDrive simply can't sync that file.

THE FIX

Work through these in order.

  1. Shorten the file nameThe quickest win. Rename the file to something shorter — drop dates, repeated words and version notes that push the length up. Every character you remove buys you headroom.
  2. Shorten long parent folder namesLong, descriptive folder names add up fast. Trim the folders the file sits inside — for example "Client Correspondence 2024–2025 Archive" becomes "Correspondence".
  3. Move the file higher up the treeDrag the file or folder closer to the top level so there are fewer folders in the path. Fewer nested folders means a shorter total path.
  4. Sync a subfolder, not the whole libraryIn SharePoint, use Sync (or Add shortcut to OneDrive) on a specific subfolder rather than the entire library. This shortens the local path prefix on your PC and can bring long paths back under the limit.
  5. Rename via the web if you can't reach it locallyIf the file won't sync at all, open OneDrive or SharePoint in your browser and rename or reorganise it there. The change syncs back down once the path is short enough.
  6. (IT) Enable Win32 long pathsIT can enable long-path support via Group Policy or the registry (the LongPathsEnabled setting). Note that not every application respects it, so it's not a complete fix on its own — shortening names is still the reliable approach.
  7. Flatten deep folder structuresIf the same folders keep hitting the limit, the structure itself is too deep. Rework it into fewer, broader levels so paths stay comfortably under 260 characters going forward.
If this keeps happening across the team, it's a SharePoint structure problem rather than a one-off file. A short review of folder depth and naming conventions ends it for good — IT can help you redesign the library so paths stay short and nobody hits this again.
FILES THAT JUST SYNC

Path-length errors are a sign the structure needs a rethink.

If files keep refusing to sync and staff spend time renaming and reshuffling folders, your OneDrive and SharePoint setup has outgrown its structure. Our free IT Health Check reviews how your business stores and shares documents — library design, sync settings and naming — and shows you exactly what to fix so files just sync and everyone can find what they need.

KEEP READING

Related resources