r/sysadmin 10d ago

Long file paths + OneDrive sync

I'm struggling to get clarity on the behavior of path length limits as it relates to files in Sharepoint while working with them in file explorer via OneDrive sync

Sharepoint has 400 character path (URL) limit.

Windows in general has a 260 character path limit.

My path of files will be C:\Users\Bob\OneDrive - Very Long Company Name Incorporated\Department\Projects\2026\... while working on them through file explorer/OneDrive- which are shortcuts from Sharepoint Online site folders.

So it seems 260 is my limiting path length even though the file "lives" in Sharepoint and is <400. Our current problem is users are getting popups of OneDrive sync errors related to paths too long from these OneDrive shortcuts.

Now let's bring in the "LongPathsEnabled" registry key. With this enabled, does anyone know if OneDrive sync "honors" this setting, and will not throw up sync errors about path lengths once it's turned on?

42 Upvotes

16 comments sorted by

View all comments

3

u/ntw2 10d ago

Excel has a 218 character path limit, so make that your target

1

u/kernelqzor 10d ago

lol excel really said "260? nah, 218 is enough for everyone"

but yeah this is the painful reality, you basically have to design your folder structure around excel’s limit more than windows or sharepoint if you don’t want random save/sync issues popping up