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

%3CLINGO-SUB%20id%3D%22lingo-sub-1037171%22%20slang%3D%22en-US%22%3EWhy%20are%20we%20still%20limited%20to%20MAXPATH%20limitations%20in%20OneDrive%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1037171%22%20slang%3D%22en-US%22%3E%3CP%3EAccording%20to%20this%20article%2C%20MAXPATH%20was%20increased%20to%20400%20characters%20(wow%20thanks)%20in%20SharePoint%20and%20OneDrive.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMicrosoft-SharePoint-Blog%2FNew-MAXPATH-limits-in-SharePoint-and-OneDrive%2Fba-p%2F68273%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FMicrosoft-SharePoint-Blog%2FNew-MAXPATH-limits-in-SharePoint-and-OneDrive%2Fba-p%2F68273%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20exactly%20is%20this%20new%20limit%20applied%20because%20the%20MAXPATH%20limit%20is%20very%20much%20still%20in%20existence%20with%20OneDrive%20for%20Business%20when%20synchronised%20and%20accessed%20via%20File%20Explorer%3F%20Double-click%20on%20a%20file%20in%20File%20Explorer%20and%20Word%20won't%20open%20it.%20Rename%20as%20a%20shorter%20file%20and%20it%20opens%20fine.%20And%20we're%20bouncing%20either%20side%20of%20the%20MAXPATH%20limit%20of%20around%20250%20(it%20seems%20to%20vary!).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBrowse%20to%20the%20file%20in%20the%20web%20browser%20and%20Open%20in%20App%20and%20it%20works%20fine.%20So%20it's%20not%20Word%20that's%20struggling.%20Bizarelly%2C%20right-click%20on%20the%20file%20and%20open%20via%20Internet%20Explorer%20and%20it%20also%20opens.%20Totally%20flabbergasted%20at%20that%20workaround%20found%20by%20a%20client.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20really%20do%20want%20to%20like%20SharePoint%20document%20libraries%20and%20OneDrive%20but%20time%20after%20time%2C%20it%20seems%20to%20score%20badly%20with%20other%20cloud%20storage%20solutions.%20Seriously%2C%20a%20client%20with%20over%20100%20Microsoft%20365%20licenses%20said%20%22Can%20you%20please%20propose%20an%20alternative%20because%20this%20path%20limit%20is%20proving%20highly%20restrictive%22.%20They%20have%20to%20use%20sync%20because%20they%20are%20unable%20to%20open%20documents%20in%203rd%20party%20apps%20from%20the%20web%20browser%20like%20%22Edit%20PDF%22%20or%20%22Edit%20in%20Photoshop%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20well%20aware%20of%20the%20history%20of%20MAXPATH%20but%20struggle%20to%20work%20out%20why%20it's%20still%20a%20problem%20now.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20solutions%20except%20drop%20OneDrive%2FMicrosoft%20365%20and%20move%20to%20Google%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1037171%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELimits%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1037559%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20are%20we%20still%20hit%20by%20MAXPATH%20limitations%20in%20OneDrive%20in%202019%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1037559%22%20slang%3D%22en-US%22%3EThe%20250%20limit%20is%20a%20Windows%20OS%20restriction.%20You%20will%20have%20the%20same%20issue%20with%20Dropbox%20and%20google%20drive%20as%20well.%20The%20difference%20being%20it%20will%20rename%20the%20files%20shorter%20which%20can%20have%20some%20bad%20side%20effects%20too.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.aurelp.com%2Ftag%2Fmaximum-file-name-google-drive%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.aurelp.com%2Ftag%2Fmaximum-file-name-google-drive%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20I%20suggest%20is%20having%20your%20users%20sync%20at%20a%20lower%20folder%20level%20to%20the%20files%20they%20need.%20%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20go%20into%20like%20five%20folders%20or%20so%20down%20the%20chain%20which%20I%20assuming%20is%20the%20case%20here%20you%20can%20click%20sync%20at%20that%20folder%20and%20it%20will%20sync%20starting%20at%20that%20folder%20essentially%20shortening%20the%20paths.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1038193%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20are%20we%20still%20hit%20by%20MAXPATH%20limitations%20in%20OneDrive%20in%202019%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1038193%22%20slang%3D%22en-US%22%3ETotally%20agree%20with%20you%20%3B).%20You%20would%20think%20there%20has%20to%20be%20a%20reason%20it%E2%80%99s%20still%20that%20way%20thou%20and%20it%E2%80%99s%20not%20an%20easy%20fix%20but%20I%20man%20I%20guess%20we%E2%80%99ll%20never%20really%20know%20%3B)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1038101%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20are%20we%20still%20hit%20by%20MAXPATH%20limitations%20in%20OneDrive%20in%202019%3F%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1038101%22%20slang%3D%22en-US%22%3E%3CP%3E%26gt%3BThe%20250%20limit%20is%20a%20Windows%20OS%20restriction.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20a%20limitation%20in%20%3CEM%3Esome%3C%2FEM%3E%20of%20the%20ancient%20functions%20in%20the%20old%20Win32%20API.%20Alternatives%20not%20limited%20by%20MAXPATH%20have%20been%20available%20for%20a%20long%20time%20so%20the%20question%20of%20why%20are%20we%20still%20effected%20by%20them%20is%20valid.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft%20controls%20Windows%2C%20File%20Explorer%20(just%20an%20app%20really)%20and%20OneDrive%20so%20am%20at%20loss%20why%20it%20can't%20be%20resolved.%20It's%20not%20an%20NTFS%20nor%20a%20Word%20issue%20as%20both%20can%20obviously%20handle%20long%20paths.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20might%20need%20to%20be%20restrained%20if%20I%20ever%20come%20across%20the%20programmer%20who%20first%20typed%20%23define%20MAX_PATH%20260%20%3A)%3C%2Fimg%3E%20And%20yes%2C%20I%20know%20the%20reasons%20it%20existed%2030%20years%20ago.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFile%20Explorer%20can%20obviously%20handle%20long%20paths%20as%20it%20can%20navigate%20down%20through%20very%20deep%20structures.%20Just%20can't%20pass%20the%20path%20to%20applications%20correctly.%20I%20assume%20it's%20the%20application%20launch%20mechanism%20that%20has%20the%20restriction.%20So%20why%20hasn't%20a%20new%20alternative%20launch%20application%20mechanism%20been%20implemented%3F%20Even%20if%203rd%20party%20app%20developers%20have%20to%20make%20changes%2C%20I'm%20assuming%20the%20changes%20wouldn't%20be%20too%20drastic.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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
Highlighted
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.

Highlighted

>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.

Highlighted
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 ;)
Highlighted

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 :(

Highlighted
Plus I wondered if space replacement by %20 was also making it even more greedy in using up the MAXPATH limit.
Highlighted
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.