New MAXPATH limits in SharePoint and OneDrive


Last month we announced support for # and % across SharePoint and OneDrive (https://blogs.technet.microsoft.com/wbaer/2017/04/06/new-support-for-and-in-sharepoint-online-and-onedrive-for-business/) and now in addition to adding support for # and % we’re also increasing MAXPATH or otherwise SharePoint and OneDrive's Url path length restrictions from 256 Unicode code units to 400.

This new limit section applies to the total length of the URL path to a folder or a file in SharePoint Online and OneDrive for Business but not to the length of any parameters. Also, these limitations apply only to un-encoded URLs, not to encoded URLs. There is no limit to encoded URLs in SharePoint Online and OneDrive for Business.

For additional information on SharePoint Url composition, refer to the details below:

The total length of a SharePoint URL equals the length of the folder or file path, including the protocol and server name and the folder or file name, plus any parameters that are included as part of the URL.

The formula is as follows:

URL = protocol + server name + folder or file path + folder or file name+ parameters

For example, the following is a typical URL path to a file stored in SharePoint:
http://www.contoso.com/sites/marketing/documents/Shared%20Documents/Promotion/Some%20File.xlsx
Where the parts of the URL path are as listed in the following table.

URL part  Example
Protocol http://
Server name www.contoso.com/
Folder or file path sites/marketing/documents/Shared%20Documents/Promotion/
File name Some%20File.xlsx

Comments (15)

  1. Nicholas Harvey says:

    Thanks, but how do we enable it?

    1. Thanks Nicholas. This improvement has been rolled out to all Office 365 Tenants and is available without any configuration.

      1. Suzanne Belote says:

        Hi Bill. Is this new limit available to SharePoint 2016 on premise?

        1. No. The MAXPATH improvements are limited to SharePoint Online and OneDrive for Business at this time.

  2. Heather LaVere says:

    How do we enable this or roll it out?

    1. Thanks Heather. This improvement has been rolled out to all Office 365 Tenants and is available without any configuration.

      1. Heather LaVere says:

        Thank you Bill for the information. We are still getting the path length error with OneDrive for Business (Build 17.3.6799.0327) and Office Pro plus version 1704.

        Secondly, how can we access files with 400 characters if Windows Explorer limitation is 260?

  3. Mat.Hiley says:

    Hi Bill, is there any plan to make this change available to on-premise SharePoint 2013 environments? The 256 char limit continues to be a bug-bear, particularly for legal teams who are traditionally more wordy in their naming conventions!

    1. No. The MAXPATH improvements are limited to SharePoint Online and OneDrive for Business at this time.

  4. chrisbigart says:

    This change will not allow Windows Explorer to access path lengths > 260 characters when mapping SharePoint/OneDrive sites as a mapped drive, correct?

    1. Correct; however, you can enable NTFS long paths in Windows to support it.

  5. Billy Brock says:

    Long Path Tool can solve your problem.You can try it

  6. Billy Brock says:

    Long path tool may help you in the best way.You can try it.

  7. CheltD87 says:

    Hi.

    I am having to migrate a large number of files from SharePoint 2007 to 365, and have had thousands of exceptions based on file path length. I have managed to run a report to list all files and file paths (on the old SharePoint site) that I am trying to move, but need to know how to work out what the new file path would be and what the limit on characters is. Would I be right in saying that using the above example, the total characters is 94 and that there would therefore be 306 remaining?

    My only reservation is that if this is the case, the number of exceptions alerted by windows during the copying process is much more than what my automated report would suggest the file path length is, based on the above example. It is a lot closer to the actual number if you assumed that a) the limit was based on the folder path only, not the full URL including parameters, and b) the limit was 256 not 400.

    Any help appreciated.

    Thanks

Skip to main content