Windows:ファイル名で使えない文字列
MS-DOS の頃の仕様をひきずっている。
予約デバイス名
table:special_file_name
AUX
CON
NUL
PRN
CLOCK$
COMn (nは正の整数)
LPTn (nは正の整数)
拡張子を外した状態で判定する必要がある。
拡張子を付けても回避できない。
Do not use the following reserved names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.
Windows 11 からは普通のファイル名として使えるようになったという報告あり。