News for hackers. Stuff that matters.
Re:Microsoft team submits Redis patch to enable Windows support by adrianpike on Thursday December 08, 2011 @04:05PM (#3331122)
Can somebody more familiar with the Windows environment explain why prn.h is an "invalid file name"?

edit:// thanks all! :)

Re:Microsoft team submits Redis patch to enable Windows support by kogir on Thursday December 08, 2011 @04:25PM (#3331204)
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...

Re:Microsoft team submits Redis patch to enable Windows support by dugmartin on Thursday December 08, 2011 @04:48PM (#3331312)
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.
Re:Microsoft team submits Redis patch to enable Windows support by motti on Thursday December 08, 2011 @07:40PM (#3331914)
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.
Re:Microsoft team submits Redis patch to enable Windows support by gresrun on Thursday December 08, 2011 @05:59PM (#3331588)
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...
Re:Microsoft team submits Redis patch to enable Windows support by jharsman on Thursday December 08, 2011 @04:10PM (#3331142)
You can't have files named like the old DOS devices: CON, LPT, AUX, PRN etc. This is originaly due to CP/M backwards compatibility, it didn't have directories so magic files were udde to pipe stuff to printers and other devices.
Re:Microsoft team submits Redis patch to enable Windows support by X-Istence on Thursday December 08, 2011 @04:13PM (#3331152)
Re:Microsoft team submits Redis patch to enable Windows support by smackfu on Thursday December 08, 2011 @04:30PM (#3331230)
"finally the behavior of the window filesystem is so incredibly broken that well they should really fix it I guess."

Ha. Just allow "prn", I'm sure that won't have any side effects.

Re:Microsoft team submits Redis patch to enable Windows support by rbanffy on Thursday December 08, 2011 @04:39PM (#3331268)
PC-DOS inherited it from CP/M 80. Windows was built at first on top of it and then replaced it in stages. I have no idea why would this still be present in the current codebase. It would probably be easier just to fix the filesystem.
Re:Microsoft team submits Redis patch to enable Windows support by plorkyeran on Thursday December 08, 2011 @07:59PM (#3331982)
There's countless batch files that rely on NUL (including with extensions, usually because some other batch file is appending the extension). Most of the other ones could probably be safely removed, but it would still run contrary to Microsoft's policy of not breaking backwards compatibility unless absolutely necessary.
Re:Microsoft team submits Redis patch to enable Windows support by manojlds on Thursday December 08, 2011 @04:09PM (#3331138)
prn is for printer and there are many such reserved device names

http://en.wikipedia.org/wiki/Device_file#Device_files