Also avoid these names followed by an extension, for example, NUL.tx7. From then on, we can live footloose and fancy-free.ĭo not use the following reserved device 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. You see, they only choose to oppress us 9 times, for COM1 to COM9.
There's even a special way in Windows to refer to Serial Ports larger than COM9 in your code, like this - \\.\COM10. Of course, it's because the underlying Win32 APIs for opening a file STILL will accept 'COM1' as a file name, as in: portHandle = CreateFile( 'COM1',ĮFileAttributes.Device | EFileAttributes.Overlapped, IntPtr.Zero) It's no doubt ' compassionate conservative compatibilityism' (my new phrase of the day) on the part of Microsoft. I'm still not clear, however, why this would be a problem in Vista.
Probably about this long: C:\Users\Scott>md com3 ORG world domination strategy - where they wanted to call the successor to COM and COM++, ' COM3.'Īpparently it didn't take long for them to realize that this was a sub-optimal name. NET CLR team - before they took over an entire Top-Level-Domain as their name, thereby effectively thwarting my own. The name of the portal folder you are sharing to contains an invalid character. Does anyone else think it's a hoot that you can't have a file called lpt1.png on your system? Or a folder called con? Ah, the Compatibility Sins of the Father.