0

I am trying to get a better understanding of how the number of characters in a SharePoint path is calculated. In our SharePoint at work we have some file/folder paths that, by my estimate, exceed the SharePoint limit of 400 characters. So either SharePoint is being kind and generous (unlikely) or I'm misunderstanding how to calculate the path length (far more likely).

Firstly…

there is the matter of encoded vs unencoded. Say I have a file in a folder like so:

folder/file name.doc 

Does SharePoint count that as 20 characters (as presented above), or does it view it as

folder%2Ffile%20name.doc 

(24 characters)?

Secondly…

Sharepoint URLs seem to include some duplication, which seems a bit unfair given the 400 character limit. Some parts of the URL might also be parametric information, and I'm not sure if they count toward the path total or not.

Take the following URL:

sites/OurMarketingSite/Shared%20Documents/Forms/AllItems.aspx?id=%2Fsites%2FOurMarketingSite%2FShared%20Documents%2FPROJECTS%2F04%20%2D%20Wrike%20Jobs%2F1367539229%2DSA%2DReddford%20Hs%20Blue%20Hills%2DOpen%20Day%2024th%20Aug%2F03%20%2D%20Final%20Package%28s%29%2F1367539229%2DSA%2DReddford%20Hs%20Blue%20Hills%2DOpen%20Day%2024th%20Aug%20v3%20Folder%2FLinks &viewid=a0e9a8d0%2D98b7%2D424c%2Da9f3%2Def954fd17f11

I've highlighted two sections in bold.

The first bolded section is really a repeat of the first part of the URL. Do both of those duplicate pieces of the URL count toward the path total?

The second bold section (I had to introduce a space before it in order for the bold highlighting to take, sorry) looks like it might be parametric info purely to define what gets shown; does THAT count toward the path total?

I've googled this but have found the official documentation ambiguous or lacking in the specifics I'm looking for; other sources (including SharePoint-savvy friends and acquaintances) have provided conflicting info. Hope somebody here can supply definitive answers.

1 Answer 1

0

The 400 character limit applies to the file path, not the URL it is contained in. As such any encoding or duplication can be ignored when considering this limit.

As per the docs (emphasis mine):

Different apps and Office versions have different limits, and the combination of limitations may be unique to your setup.

The entire decoded file path, including the file name, can't contain more than 400 characters for OneDrive for home, OneDrive for work or school and SharePoint in Microsoft 365. The limit applies to the combination of the folder path and file name after decoding.

https://support.microsoft.com/en-us/office/restrictions-and-limitations-in-onedrive-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa?ui=en-us&rs=en-us&ad=us#filenamepathlengths

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.