7/10/2009

SharePoint: File name, folder name and path limits

 

The official numbers are:

  • folder name - not more than 128 characters  (123? see below)
  • file name - not more than 128 characters (128? see below)
  • total path to file - not more than 260 characters

And be aware that space and other special characters typically require three characters each.  Ie.  Test File  is  Test%20File

 

Built-in limits:

The page used to create folders and has a text box with a limit of 123 characters (go figure!).

The page used to edit properties for files has a text box with a limit of 123 characters, but that makes sense as Office 2007 has four character file extensions, so 123 + a period + 4 = 128.

And for completeness, here's the error message if you try to upload a file with too long of a name or a combined URL that is too long:

"The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name."

 

.

5 comments:

Anonymous said...

Hi Mike,
What is the workaround to suppress the message. I get a message "The URl for file is too long for the Application. A Temporary copy of this file will be opened on your computer. You must save this copy as a new file". Then by clicking [Ok], it brings up the document. The extra step is annoying to many who just wants to read the document.

Mike Smith said...

Anonymous,

Short answer... shorten the file name, the folder name or the library name and reupload the file.

Here's some more info:
http://blogs.msdn.com/b/selvagan/archive/2009/12/06/unable-to-edit-files-uploaded-to-document-library-where-url-length-is-more-than-260-characters.aspx

Mike

cherdt said...

Thanks for the info! BTW, space characters (and other URL-encoded characters) should only count as 1:

"...these limitations apply only to un-encoded URLs, not to encoded URLs."
Source: http://technet.microsoft.com/en-us/library/ff919564(office.14).aspx

Unknown said...

Long path tool is the best solution for your problem. try it and solve your problem.

Roksolana said...

Long Path Tool help me a lot when i have an issue like file deleting or renaming the file. Also good to use if file name and file extension is too long.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.