The following macros are not currently supported in the header:
  • style

How to Find Documents with Long URLs

Description

You can use the Item Query report to find items, files and pages in SharePoint that have long URLs, such as greater than 260 characters (SharePoint 2010, 2013, 2016).

Intro

There may have been times when working with SharePoint where you click on a link or try to add a file and you get an error: 

"The specified file or folder name is too long"

Ouch!

It sometimes can be difficult to change folder structures and subsite structures without breaking things.

If you are doing a migration, you may want to locate all folder or subsite paths that could potentially cause issues, such as longer than 220 characters, so that you can restructure as needed or advise Business Owner.

This article shows you how to find where URL lengths may be an issue for items, files, folders and web pages using the SharePoint Essentials Toolkit.

  • SharePoint 2010, 2013, 2016 have a limit of 260 characters in the URL.
  • SharePoint 2019, SharePoint Online, OneDrive and OneDrive for business have a max character length of 400.

References on these limitations

https://support.microsoft.com/en-us/help/894630/you-receive-a-the-specified-file-or-folder-name-is-too-long-error-mess

https://support.office.com/en-us/article/invalid-file-names-and-file-types-in-onedrive-onedrive-for-business-and-sharepoint-64883a5d-228e-48f5-b3d2-eb39e07630fa

https://techcommunity.microsoft.com/t5/Microsoft-SharePoint-Blog/Announcing-Availability-of-SharePoint-Server-2019-Preview/ba-p/214427

Step-by-Step

Within the SharePoint Essentials Toolkit, you can utilize the “Item Query” feature to find any type of text or content easily. 

  1. Open the SharePoint Essentials Toolkit
  2. Select the sites that you want to find long URLs for. Then right click and select "Create Reports->Item Query"



    If you select only one site, it will have slightly different menu options:


  3. Give the Job a name that describes what we are doing, such as "Find Files and Folders with long URLs"
  4. Change the drop down to use "Item URL Character Length" (or you can use "File URL Character Length") is "greater than", and enter a value



  5. (Optional) You can click "Advanced Options" to exclude or only Include specific Lists.
  6. Click "Run Now", the job will run and query every site and list selected. 
  7. Once done, there will be a blue button called "Open Report", click it
  8. The report will open to show you results for URLs longer than the specified character length.



  9. Below I validated for a file, but this also could have been for a folder or subsite, where I may need to move it a bit 'higher' up the site tree and less 'deep'.

©2018 QiPoint
2500 Plaza 5, 25th Floor
Harborside Financial Center
Jersey City, NJ 07311 http://www.qipoint.com

Microsoft, Windows, SharePoint, and the SharePoint logos, are either registered trademarks or trademarks of Microsoft Corporation.