Microsoft published a KB article telling which character cannot be used in sitesnames, folders and filenames. This overview can be usefull when creating bulk import scripts, site creation tools or just finding out which charaters caused an upload error 

| 1. |
In the following scenarios, you cannot use the certain characters in a site name or a subsite name:
| a. |
You cannot use the following characters anywhere in a site name or a subsite name:
| • |
tilde (~) |
| • |
number sign (#) |
| • |
percent (%) |
| • |
ampersand (&) |
| • |
asterisk (*) |
| • |
braces ({ }) |
| • |
backslash (\) |
| • |
colon (:) |
| • |
angle brackets (< >) |
| • |
question mark (?) |
| • |
slash (/) |
| • |
plus sign (+) |
| • |
period (.) | |
| b. |
You cannot start a site name or a subsite name with an underscore (_) character or a period character. |
| c. |
You cannot use the period character consecutively in the middle of a site name or a subsite name. |
| d. |
You cannot use the period character at the end of a site name or a subsite name. | |
| 2. |
In the following scenarios, you cannot use certain characters for a folder name:
| a. |
You cannot use the following characters anywhere in a folder name:
| • |
tilde |
| • |
number sign |
| • |
percent |
| • |
ampersand |
| • |
asterisk |
| • |
braces |
| • |
backslash |
| • |
colon |
| • |
angle brackets |
| • |
question mark |
| • |
slash |
| • |
plus sign |
| • |
period | |
| b. |
You cannot use the period character consecutively in the middle of a folder name. |
| c. |
You cannot use the period character at the end of a folder name. |
| d. |
You cannot start a folder name with the period character. | |
| 3. |
In the following scenarios, you cannot use certain characters for a file name:
| a. |
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 |
| • |
plus sign |
| • |
period | |
| b. |
You cannot use the period character consecutively in the middle of a file name. |
| c. |
You cannot use the period character or the comma character at the end of a file name. |
| d. |
You cannot start a file name with the comma character or with the period character. | |
Read the article