Hacker News new | ask | show | jobs
by kogir 5310 days ago
It's reserved for compatibility:

"Do 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. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended."[1]

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...

2 comments

I once saw some interesting behavior on a Windows 95 machine - my brother printed a drawing for a convention to a file. The printer was a HP LaserJet with plug in module that enabled Postscript. He named the file "con" and when he hit OK on the print dialog the entire screen buffer (over the windowing interface) started filling with Postscript.
Windows tries to prevent you naming a file "con". I once renamed a text file con in Win95; using a raw disk editor to change the file entry and it did this too - every time I saved text in the file it would write it console/DOS style to the screen.
We're encountered this issue when dealing with ETF tickers. We use Linux but a 3rd-party redistributor was on Windows; the reports we created had file names in the form <TICKER>.pdf and, what would you know, PRN.pdf caused all sorts of trouble for them...