Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What special characters are allowed and not allowed in sharepoint file/folder names?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The rules are "very simple" (see the full KB article here), which is why you should alway use SPUrlUtility to check filenames.

Except about folders and files:

Folder names
•You cannot use the following characters anywhere in a folder name or a server name:
◦tilde
◦number sign
◦percent ◦ampersand
◦asterisk
◦braces
◦backslash
◦colon
◦angle brackets
◦question mark
◦slash
◦pipe
◦quotation mark
•You cannot use the period character consecutively in the middle of a folder name.
•You cannot use the period character at the end of a folder name.
•You cannot start a folder name with the period character.

File names
•You cannot use the following characters anywhere in a file name:
◦tilde
◦number sign
◦percent
◦ampersand
◦asterisk
◦braces
◦backslash
◦colon
◦angle brackets
◦question mark
◦slash
◦pipe
◦quotation mark
•You cannot use the period character consecutively in the middle of a file name.
•You cannot use the period character at the end of a file name.
•You cannot start a file name with the period character.
•In addition, file names and folder names may not end with:
◦.files
◦_files
◦-Dateien
◦_fichiers
◦_bestanden
◦_file
◦_archivos
◦-filer
◦ _tiedostot
◦_pliki
◦_soubory
◦_elemei
◦_ficheiros
◦_arquivos
◦_dosyalar
◦_datoteke
◦_fitxers
◦ _failid
◦_fails
◦_bylos
◦_fajlovi
◦ _fitxategiak

share|improve this answer
    
Can you escape any of these? Using a HEX code for example? –  Mzn Jan 23 at 2:35

You should call SPEncode.UrlEncode, passing in filename.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.