File path too long

Anonymous
2020-03-30T00:19:55+00:00

It's comical that the url telling me I can't create a site template because a 136 character file path is too long -  has 536 characters!! Especially since this is a news link so the file path was created by MSFT, not me! You can't make this stuff up.

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
{count} votes

7 answers

Sort by: Most helpful
  1. Anonymous
    2020-03-30T02:49:23+00:00

    Hi webbrewers3,

    According to your description, I did a test on my side. 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.

    Note: the whole limited is around 260 characters since the prefix “https://tenantname.sharepoint.com/sites/sitename” that hidden in the error message

    Therefore, the file path includes the following:

    1. Template name;
    2. Document library name;
    3. Folder name(s).
    4. File name.

    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;

    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, If you have a further concern about this feature, we would kindly suggest you share your experience in the SharePoint UserVoice. Our team is happy to listen to the user's suggestions so that we can understand the user's concern better and provide a better product to our customers.  

    Thanks for your understanding and cooperation.

    Best Regards

    Higgins

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Anonymous
    2020-04-09T23:49:42+00:00

    I want to know why the excessively long urls Msft creates are supported but I can't save a site template because of this dumb limit?

    3 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2020-04-10T06:59:20+00:00

    Hi webbrewers3,

    Thanks for your updating.

    From this article, we can see that the entire path, including the file name, must contain fewer than 400 characters for OneDrive, OneDrive for Business and SharePoint Online.

     

    Reference: Invalid file names and file types in OneDrive, OneDrive for Business, and SharePoint

    But this is a limit of creating documents. And obviously, by our test, we already know that saving a site as a template has another limit, although this isn't mentioned in the article since this is a limitation of service, rather than a settings which means they are different limitation.

     

    That's why we can create too long a file path without error message but doesn’t set this site as a template.

    Besides, based on our test, the only way to successfully save the site as a template is the shorten the template/library/folder name. If you are not contending with just shortening the path, I'd like to suggest posting your request in UserVoice, we'll appreciate it.

    Thanks again for your understanding and patience.

    Best Regards

    Higgins

    1 person found this answer helpful.
    0 comments No comments