A frequently asked question resembles "What characters are forbidden in Windows directory names?"


The short answer is: < > : " / \ | ? *


This is not the whole answer though, other considerations include how characters work in Barcodes, Comma Separated Text Files, Spreadsheets, XML Data, URI links, etc. Dangerous characters that behave differently across these different concerns include, but are not limited to: ~ ! @ # $ % & ` , . ' ;


A “comprehensive guide” of forbidden filename characters is not going to work on Windows because it reserves filenames as well as characters. Yes, characters like * " ? and others are forbidden, but there are a infinite number of names composed only of valid characters that are forbidden. For example, spaces and dots are valid filename characters, but names composed only of those characters are forbidden.


Windows does not distinguish between upper-case and lower-case characters, so you cannot create a folder named A if one named a already exists. Worse, seemingly-allowed names like PRN and CON, and many others, are reserved and not allowed. Windows also has several length restrictions; a filename valid in one folder may become invalid if moved to another folder. The rules for naming files and folders is on MSDN.

(...) 


"You cannot, in general, use user-generated text to create Windows directory names."

https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names

Dour High Arch


Microsoft Naming Files, Paths, and Namespaces Rules

https://msdn.microsoft.com/en-us/library/aa365247