Why are we still hit by MAXPATH limitations in OneDrive in 2019??

Brass Contributor

According to this article, MAXPATH was increased to 400 characters (wow thanks) in SharePoint and OneDrive.

 

https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/New-MAXPATH-limits-in-SharePoint-an...

 

Where exactly is this new limit applied because the MAXPATH limit is very much still in existence with OneDrive for Business when synchronised and accessed via File Explorer? Double-click on a file in File Explorer and Word won't open it. Rename as a shorter file and it opens fine. And we're bouncing either side of the MAXPATH limit of around 250 (it seems to vary!).

 

Browse to the file in the web browser and Open in App and it works fine. So it's not Word that's struggling. Bizarelly, right-click on the file and open via Internet Explorer and it also opens. Totally flabbergasted at that workaround found by a client.

 

I really do want to like SharePoint document libraries and OneDrive but time after time, it seems to score badly with other cloud storage solutions. Seriously, a client with over 100 Microsoft 365 licenses said "Can you please propose an alternative because this path limit is proving highly restrictive". They have to use sync because they are unable to open documents in 3rd party apps from the web browser like "Edit PDF" or "Edit in Photoshop".

 

I'm well aware of the history of MAXPATH but struggle to work out why it's still a problem now. 

 

Any solutions except drop OneDrive/Microsoft 365 and move to Google??

6 Replies
The 250 limit is a Windows OS restriction. You will have the same issue with Dropbox and google drive as well. The difference being it will rename the files shorter which can have some bad side effects too.

https://www.aurelp.com/tag/maximum-file-name-google-drive/


What I suggest is having your users sync at a lower folder level to the files they need.

If you go into like five folders or so down the chain which I assuming is the case here you can click sync at that folder and it will sync starting at that folder essentially shortening the paths.

>The 250 limit is a Windows OS restriction. 

 

It's a limitation in some of the ancient functions in the old Win32 API. Alternatives not limited by MAXPATH have been available for a long time so the question of why are we still effected by them is valid. 

 

Microsoft controls Windows, File Explorer (just an app really) and OneDrive so am at loss why it can't be resolved. It's not an NTFS nor a Word issue as both can obviously handle long paths.

 

I might need to be restrained if I ever come across the programmer who first typed #define MAX_PATH 260 🙂 And yes, I know the reasons it existed 30 years ago.

 

File Explorer can obviously handle long paths as it can navigate down through very deep structures. Just can't pass the path to applications correctly. I assume it's the application launch mechanism that has the restriction. So why hasn't a new alternative launch application mechanism been implemented? Even if 3rd party app developers have to make changes, I'm assuming the changes wouldn't be too drastic.

Totally agree with you ;). You would think there has to be a reason it’s still that way thou and it’s not an easy fix but I man I guess we’ll never really know 😉

It's very annoying as I'm having to defend my recommendation my client switches from DropBox Business to OneDrive. Okay, so Dropbox (et al) when working with File Explorer all have the same problem but OneDrive amplifies the problem with using a very long HTTP header.


Dropbox: C:\Users\123456790123\Dropbox

OneDrive: https://tenantnamehere-my.sharepoint.com/personal/onedrive_tenantnamehere_onmicrosoft_com/Documents 

 

So 30 character pre-amble for Dropbox (12% of MAXPATH) but OneDrive 99 character pre-amble (40% of MAXPATH).

 

I tried to be clever and used a junction to reduce the path length and whilst it opens, it opens read-only and without autosave 😞

Plus I wondered if space replacement by %20 was also making it even more greedy in using up the MAXPATH limit.
That URL MAXPATH is over 400 thou to make up for it. The local MAXPATH for onedrive is going to be c:\users\username\onedrive - orgname closer to dropbox's.