4 ms·
Yea, it's not really a bug so much as just a very old legacy limitation. Microsoft has ripped out a lot of NT/XP compatibility in Win 7/8/10. I wonder if these
by djsumdog 8y ago
Yea, it's not really a bug so much as just a very old legacy limitation. Microsoft has ripped out a lot of NT/XP compatibility in Win 7/8/10. I wonder if these special names are still in a lot of use, or if it's just low priority (or it's in a part of the code base where it's low tech debt and no one cares).
- markmark 8y agoExactly. I read this thread this morning and found it a bit frustrating that is was being called a bug. This isn't a bug, it's a documented feature that still exists for backwards compatibility. You may not like it, or may not agree that it still exists, but it was intentionally designed and has been intentionally kept around. It's like complaining that you can't make a file name with / in it under linux (or perhaps making a file with / in it's name on a system that allows it then saying linux has a bug when it can't open it).
- p2t2p 8y agoYes and no. In Linux you can use an Unicode that looks like slash. Candidates are U+2044, U+2215, U+29F8, U+FF0F, and U+2571. However similar trick probably would work in Windows as well. Does anybody care to try? :)
- jarfil 8y agoUnicode tricks work on Windows too, it's just the exact \ / etc. characters that are reserved.
- p2t2p 8y agoAlso, I've just tried and on Mac OS I can create a folder with "/" in the name no problem.
- justinsaccount 8y agoThe path separator on HFS is :, not /
- p2t2p 8y agoo_O TIL.
- gpvos 8y agoA comment elsewhere on this page claims that COM² and COM³ are also forbidden in Windows, due to Unicode mapping...
- jarfil 8y agoThis feature has long outlived its usefulness, and should've been deprecated decades ago. Windows can run programs in "compatibility mode", so there is really no reason to keep these special files around for most programs. Maybe run CMD.COM in compatibility mode by default, so that batch files still work like 40 years ago, but other than that there is no reason to have that feature/limitation imposed on the graphical file Explorer, or pretty much any other software. Not being able to use / in filenames under Linux is slightly different because the / has an actual legitimate widespread use with no real alternative.
- rkagerer 8y agoI imagine popular ones like NUL and CON are still in use; I have machines running daily batch files containing those. Using long UNC paths or writing to the FAT/NTFS filesystem through mechanisms other than Win32 allows you to bypass the restriction. If you really want to be nasty to someone: echo hello > \\.\C:\Con.fess.I.know.what.you.did