File name limitations

Based on my experience with customers, training attendees and, more generally, end users, if I ask “What is SharePoint” the answer I get back most of the times is “It’s a document management system”.

Of course it is – also – a document management system. I presume that DM features, being there since the very first version of the product, connotate the product especially for people who do not know it in depth.

That said, and even if you want to consider it just a document repository, it requires you to obey a set of rules for files and, more generally, folder names.

Most of these rules are a consequence of the fact that a file/folder name *is* the file/folder url, and as such you cannot have anythiing in there Smile

Here’s a short list of the limitations you should consider when defining names

Forbidden characters.

You cannot use any of the following characters:

  • /
  • \
  • :
  • *
  • ?
  • <
  • >
  • |
  • #
  • <TAB>
  • {
  • }
  • %
  • ~
  • &

Plus, the last character of the file name should never be a dot (.).

File name length.

The file name (just the name, not the full path) should be less than 128 characters, including the file extension.

Path length.

The full url of the file/folder should be less than 260 characters.

And maybe

Beyond these basic rules, there may be something else that is not strictly required, but could immensely help avoid bugs: for example, you can include a + character in a file name, but you will break any code that does not escape urls correctly (a plus character in urls is translated to <SPACE>). You may argue that this is not your fault, if something breaks because it doesn’t handle escaping correctly. And you are right… but anyway, sometimes it’s just a matter of convenience Smile