SharePoint online template - file name too long but under character limit

Anonymous
2019-06-13T11:48:31+00:00

Hi all,

I am unable to save a SharePoint site and contents as a template as the file names are too long. However, it is SharePoint that creates the long file names as it includes the entire folder path in the file name. Not only that but the resulting file name including all characters and spaces  is 171 characters - less than the published limit. This is rendering a huge piece of work useless.

Has anyone else experienced this and found a way around it?

I really need to duplicate this site a number of times as it acts as a basic template that departments will use and add their own custom content too.

Any help would be greatly appreciated.

Thanks,

Dan

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

15 answers

Sort by: Most helpful
  1. Anonymous
    2019-06-19T10:31:23+00:00

    Hi Nathan,

    I'm pretty surprised by this response and find it quite insulting.

    Firstly, as I mentioned, I am trying to save a modern site s a template not a classic site that you referred to.

    Secondly, as I have already said - your published figure is 400 characters not 157.

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

    "The entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business and SharePoint Online. If you exceed that limit, you'll receive an error message."

    Thirdly I understand how SharePoint is allocating the character limit - it should not matter if the published limit was correct.

    I can also work out for myself that shortening the various part of the file path to below 157 characters would work but as I have explained this would not be a practical solution.  It would mean folder path and file names that no longer make sense or can be easily searched for as I'm sure you can appreciate.

    Can you advise if you're knowingly publishing incorrect figures and why? Or perhaps the 400 limit refers to something else, if so can you enlighten me?

    I'm deeply frustrated by SharePoint online, the lack if support and the constantly changing landscape. It makes it very hard to use as a business tool.

    Thanks,

    Dan

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-06-13T15:52:29+00:00

    Hi Nathan,

    Thanks for your response. However, we're using the modern experience and the published figure is 400 characters. That is what I have worked to.  We can not alter the file names as they will no longer make sense or be searchable in the correct way.

    Of 1400 files I think 60% are now too long and identifying them will take quite some time. The main point is our file names are fine but SharePoint has created huge file names to suit it's own design rather then the needs of the user.

    A change in the future won't help our organisation now and I stand by the fact that the published figures say 400 characters. Hoping the development team might change it in the future isn't going to salvage this project which has been carried out with SharePoint specs in mind.

    If the character limit is 157 and SharePoint is going to use about 150 of those characters I have little to no room to play with in terms of file names or even folder names.

    Is there another way to duplicate the site?

    Many thanks,

    Dan

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-06-19T15:43:18+00:00

    Hi Dan,

    I feel very sorry if you misunderstood my words. Everything I'm trying to do, is no more than do my best to help you. All the suggestions that I provide you are based on my many tests. I assume that your are saving classic site because per my test, I found that by default the "Save site as template" option doesn't exists in Site Settings, you would need to run commands in PowerShell to enable this feature, while in a classic SharePoint site this feature already exists when created. And that's why I though you are using a classic SharePoint Online site with a modern UI. But as both the classic sites and the modern sites have the same limit, this should be not so relevant to our real concern, the characters limit.

    Yes, the article mentioned the 400 characters limit, which is actually proved on your side: because this is a limit of creating documents. But obviously, by our test we already know that saving a site as template has another limit, although this isn't mentioned in the article.

    Since this is a limitation of service, rather than a setting, I tried to figure out the actual limitation, by multiple tests, then again I found that if you want to keep the name of files unchanged, the only way to successfully save the site as template is the shorten the template/library/folder name. I gave you these suggestions not because they are easy to make, but because I have tried other ways and these are the solutions that worked on my side.

    If you are not contend with just shortening the path, I'd like to suggest posting your request of lifting the Save Site as Template character limit to be above 157 in the SharePoint Sites and Collaboration forum in UserVoice, it's designed for the users sharing their suggestions and requirements with the development engineers so that they could add or modify features according to the feedback.

    Best Regards,

    Nathan

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2019-07-03T16:41:16+00:00

    Hi Dan,

    I’m very sorry for the inconvenience this has caused. I understand your feeling, and that you created your files within the 400 limit. However, I would like to explain that the 400 characters limitation of creating and syncing your files and the file path length limitation of saving a site as template are two different things. I’m sorry for the confusion these two limitations have caused. Additionally, after consulting with the related team, the file path showing in the error message is only part of the complete URL, and the limitation of the complete URL (with the prefix “https://tenantname.sharepoint.com/sites/sitename/_catalogs/solutions” that hidden in the error message) is around 260 characters. That’s why my previous test result of the part of the URL limitation is around 157. We need to add the prefix as well to check whether it hits the 260 limitation.

    Therefore, saving site as template needs to meet the 260 characters limitation but not the 400 limitation. We really understand your willing to save as the template without this limitation, unfortunately, the feature works in this way.

    In this scenario, I would like to suggest you considering the following workaround to get rid of this limitation:

    1. Save the site as template without the contents;
    2. Copy your files from this site to your new sites by one of the following options:

    a. Copy the files to the new sites with the “Copy to” feature. By using this feature, the file histories will be reserved in the new sites.

    b. Open the document libraries in the file explorer, and copy the files in the file explorer. In this way, the file history won’t be preserved, but this method is more convenient.

    I’m really sorry again for this inconvenience for your concern, please kindly submit your request to our UserVoice, this is the best platform for us to hear from you and to make our products and services better for you and others. Many suggestions have been taken via UserVoice, such as expanding the SharePoint file path limitation from 256 to 400 in this entry. Your voice is always important to us.

    Best Regards,

    Nathan

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2019-06-13T14:49:19+00:00

    Hi Dan,

    Based on my tests, the limit of the characters (including the folder path and the file extent name) is 157 when saving a classic SharePoint Online Site as template by Settings >Site Settings > Save as Template. If your file has exceeded this limit, you may modify your document library/folder/file name to reduce the character numbers.

    If you want to change the limit of characters, I'd suggest posting your requirement in the SharePoint Sites and Collaboration forum in UserVoice, so that the development team would know your suggestion and change it in the future.

    Best Regards,

    Nathan

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments