anyone tried opening the magic file "con" from MS DOS Edit?

I was hoping for an editor but it turns out instead it happily opens it but then hangs forever

weird punnet square of results:

EDIT hangs if you open "CON", but errors if you try "C:\CON\CON"
Win95 errors if you try to open "CON", but crashes if you try "C:\CON\CON"

@foone

Wasn't there also once a bug in Win7 or 8 that caused it to hang in kernelspace and bluescreen with these once?

@agowa338 Win95 had that bug, yeah

@foone No, I mean something way more recent. Cause that together with early days Minecrafrt modding (where you had to unzip the jar file and then at some version there was a file named "AUX" in it)

where when I learned about these special filenames for the first time. And I didn't play minecraft on anything less recent than win7, so...

@agowa338 oh that's not a bug, that's an intentional design decision. windows reserves a bunch of filenames and it's a pain

the bug where this crashed the machine hasn't been there since windows 95, that's a separate issue

@foone @agowa338 it was fun in Windows 98 times! Great trolling with <img src="con/con">

@foone

No there was a similar crash bug in Win7. Then they must have reintroduced it at some point.

And the AUX one the bug was then with minecraft as it would silently drop that file when unzipping and then the unzipped jar wouldn't properly execute anymore.

I just wanted to add that piece to nail down the timeframe of when I a similar bug.

@agowa338 oh neat, I must have missed that news then!
In a throwback to the ’90s, NTFS bug lets anyone hang or crash Windows 7, 8.1

It's like the bug all over again.

Ars Technica
@foone @agowa338 CON means /dev/ttyS0
There is also NUL and LPT.

@f4grx @agowa338 yeah!

I made a list of the reserved names, as a git repo, so that windows users can not check it out

https://github.com/foone/forbidden-files

GitHub - foone/forbidden-files: Files that cannot be created on windows

Files that cannot be created on windows. Contribute to foone/forbidden-files development by creating an account on GitHub.

GitHub
@foone @agowa338 hahaha evil

@f4grx @foone

You're missing the ones with the superscript number btw.

@agowa338 @f4grx mm? I'm not seeing that, which ones?

@foone @f4grx

COM¹, COM², COM³, LPT¹, LPT², and LPT³

See the note on the microsoft naming a file docs page I linked to in my other post.

It's another funny windows quirk.

@foone @f4grx

> Windows recognizes the 8-bit ISO/IEC 8859-1 superscript digits ¹, ², and ³ as digits and treats them as valid parts of COM# and LPT# device names, making them reserved in every directory. For example, echo test > COM¹ fails to create a file.

Source: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Naming Files, Paths, and Namespaces - Win32 apps

The file systems supported by Windows use the concept of files and directories to access data stored on a disk or device.

@foone
The msdn article mentions that superscript digits are recognised as digits and therefore also illegal, but your repository doesn't have them.

COM¹.txt (and 2, 3 but my phone doesn't allow me to type those in superscript) should be in it too.
@f4grx @agowa338
@foone @f4grx @agowa338 don't neglect MacOS (default) case-insensitive file names. I first discovered I was on one of those when a git repo had both makefile and Makefile in one directory. For extra strangeness, do it with directories
@foone @f4grx @agowa338 I wonder what happens if you put these files names in a zip file and try to open it on Windows?

@avatastic @foone @f4grx

I can tell you, Minecraft modding had that issue for quite a while. You can see the files inside the Zip. But when you extract it either shows an error of not being able to copy that file (for some of them) or if e.g. you have a COM1 port and the file was named COM1 it just sends it out the COM1 port and doesn't show any error. So you're missing that file without knowing it.

Oh and some 3rd party archive managers just always drop them silently.

@foone @f4grx @agowa338 These work on Windows 11, but not earlier Windows versions.
@jernej__s @foone @f4grx @agowa338 You can create these files manually, but you don't get them when you do git clone ...
@goedelchen @foone @f4grx @agowa338 Might be a compatibility limitation inside git itself, as the change is relatively recent…
@foone @f4grx @agowa338
I don't know if this is funny or terrible.
I'm going with F* funny!

@f4grx @foone

Well there are way more:

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³

https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Naming Files, Paths, and Namespaces - Win32 apps

The file systems supported by Windows use the concept of files and directories to access data stored on a disk or device.