Good Stuff to Know About SharePoint Files, Folders, URLs, Sites and the Like
When working with SharePoint, one question that comes up often is what are the restrictions on file names, folders, and URLs. I have been gathering information from various Microsoft resources to compile a list. The following applies to WSS 2.0, WSS 3.0, SPS 2003, and MOSS 2007.
File & Folder Restrictions
- You cannot use the characters " # % & * : < > ? \ / { | } ~ in a file or folder name.
- A file or folder name in a URL cannot contain more than 128 characters in WSS 2.0/3.0 and MOSS.
- You cannot start or end a file name or folder with a period. For example, .MyFile.docx and MyFile.docx. are both invalid names.
- Periods are not allowed consecutively in the middle of a file or folder name. For example, My..Project.file is not a valid name.
URL Restrictions
- As a best practice do not use URLs longer than 256 so users can include the links in the links list, as mentioned in Miscellaneous section below.
Site Restrictions
- You cannot use the characters " # % & * : < > ? \ / { | } ~ in a site name.
- You cannot start a site name with an underscore. For example, _MySite is not a valid name for a site or a subsite.
- Periods are not allowed consecutively in the middle of a site name. For example, My..Site is not a valid name.
- You cannot start or end a site name with a period. For example, .MySite and MySite. are both invalid names.
Document Libraries
- If you use one of the following characters in a Document Library they will be removed: Comma, hyphen, period, left and right parenthesis ().
Miscellaneous Tips
- Do not use underscores in a site name. Although allowed, Microsoft discourages it.
- Link list items cannot be more than 256 characters.
- If you want to restrict users from creating site names that are too long and will cause problems, you can use the site creation management Web part from Bamboo.
- Blocked file uploads can be easily bypassed in SharePoint by simply renaming the file. For example, report.exe can be easily uploaded by renaming it to report.exz. You will be able to save it to another location and then rename it back. However, you won't be able to execute it on the server because it will be blocked by SharePoint.
- ForeFront Security for SharePoint will block files based on their content.
- Former MVP and now Microsoft employee Angus Logan has documented a method to validate SharePoint file names on upload.
Leave a Comment