A long time ago, probably Windows 95 on a FAT16 harddisk, I started using the following:
regexp(fname, ['^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)', ...
At that time, Windows had the most restrictive file name conventions. I am not sure what the rules are now. You also should check for the length of the path and the total number of characters in the file name.