4

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

7

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

  • 1
    Can you escape any of these? Using a HEX code for example? – Mzn Jan 23 '14 at 2:35
0

You should call SPEncode.UrlEncode, passing in filename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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