Firstly, full credit for this information goes to Mischa Oudhof and this sysadmin blog for this really useful post in 2010! I thought i’d write it up here just for my own sanity (and incase that page were to ever not exist) plus add a few extra bits of my own.
So recently a user was trying to upload multiple documents into SharePoint 2010 by copying/pasting using file explorer for the destination library. When copying across the files they received something like this message:

What are the restrictions?
There are a whole load of restrictions when it comes to file name, length, characters within SharePoint. This affects site collections, sub-sites libraries or lists. Here are some of the more general restrictions:
- File and folder name lengths can’t exceed 128 characters in both WSS 2.0 as WSS 3.0
- Link list items can’t exceed 256 characters
- The entire path of files can’t exceed 260 characters
Here are some, more specific restrcitions again applying to site collections, sub-sites, libraries or lists:
- Can’t be longer than 128 characters
- Can’t use: ~ # % & * { } \ : < > ? / + | ”
- Can’t use the period character consecutively in the middle of a file name (blah…blah.docx)
- Can’t use the period character at the end of a file name
- Can’t use the period character at the start of a file name
- Can’t end with:
.files
_files
-Dateien
_fichiers
_bestanden
_file
_archivos
-filer
_tiedostot
_pliki
_soubory
_elemei
_ficheiros
_arquivos
_dosyalar
_datoteke
_fitxers
_failid
_fails
_bylos
_fajlovi
A deep dive into all the potential restrcitions can be found in the msdn blog here.
Things have changed in Office 365…
Microsoft announced in 2017 that the old maxpath limit has been expanded to 400 Unicode code units. Microsoft also announced more URL improvements for the support of # and % characters.

References
http://www.sysadminsblog.com/microsoft/file-name-length-and-character-restrictions-for-sharepoint/ – Original write up by Mischa Oudhof of Sysadminblog.com