What I’m trying to do
I have been using three letter codes for filenames. All works fine, except that for some reason the filename “CON” is forbidden. Why is it forbidden and are there others?
I have been using three letter codes for filenames. All works fine, except that for some reason the filename “CON” is forbidden. Why is it forbidden and are there others?
It depends on the operating system, here is a pretty good list
This could help you out
…
As well as this
(for Windows at least): https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
It states somewhere in there :
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, COM¹, COM², COM³, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT¹, LPT², and LPT³. Also avoid these names followed immediately by an extension; for example, NUL.txt and NUL.tar.gz are both equivalent to NUL.
Edit: I didn’t see Joethei reply above due to a connexion hiccup ![]()
Please, don’t mind me ![]()
So it is just reserved. That’s annoying, but thank you for helping me understand.