pleroma.debian.social

pleroma.debian.social

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

A screenshot of a blank MS Dos Edit screen, a plain text user interface from the early 90s. The opened file is named "con"

@foone What if you push ^Z so it knows it finished loading CON?

@foone Try opening C:\CON\CON :D

@fozztexx I tried, no change

@foone ^Z followed by ^M like I have to do with `COPY CON FILE.TXT`?

@fozztexx Nothin'

@foone What's the longest you've tried waiting?

@mirth I have ADHD, so its lucky if I gave it a full 5 seconds

@cr1901 path not found, it says

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

what about C:\CON\NON\CON

@gloriouscow ahh, doing CNC with your computergirl. Just remember, the safe word is CTRL+ALT+DELETE

@foone @gloriouscow beeeeeeeeeeeeeeep!

@foone trying to con DOS...

@freya @gloriouscow whoops rebooted my goddess there

@foone @gloriouscow gonna have to bite you, pet

@freya @gloriouscow I just assumed you were gonna do that anyway?

@foone @gloriouscow well of course

@foone
How about if C:\CON\CON exists?

@sabik it can't exist, you can't create a folder named "CON".

like, to this day. I just tried on windows 11, it told me no

@foone That's not so bad, you dodged a long con.

@foone
I mean, with a disk editor...

@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!

@agowa338 very neat

@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

@foone @agowa338 hahaha evil

@foone

this was fun times in windows 95 as well, sending your friends files like con and lpt1

@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
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
replies
0
announces
0
likes
1

@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 These work on Windows 11, but not earlier Windows versions.

@sabik @foone you don't even have to go that far; creating files having mounted the drive under linux is enough

most of the windows file name limitations are enforced at the Win32 API layer, not NTFS (or even FAT). which means some casual quoting in a linux shell can turn into trying to remember the \\?\ UNC path magic to deal with them under Windows.

...god, I wonder if WSL1 can also do it, since it's a kernel personality

@sabik @foone (hunh! just threw DamnSmallLinux at my win98 VM, and the Linux 2.4 FAT driver is giving "Invalid argument" to creating either a file or directory named that. coward.

I've definitely accidentally made illegal filenames from Linux when dual-booting NTFS-era Windows.)

@sabik @foone Yeah there we go. SystemRescueCD + WinXP VM, just needed to slip an era later.

Nothing crashes when I try to open it in Notepad, it just throws an "Access denied" MsgBox.

And trying to delete it shows the layer confusion (remember when people used standard MsgBox, so Ctrl-C worked?):

"Cannot delete CON: Cannot find the specified file.

Make sure you specify the correct path and file name."

Explorer circa WinXP showing a file called CON inside a folder called CON on the desktop. Most of its properties are missing because half of Windows doesn't think this can exist, but the other half is just fine with it.

@foone @f4grx @agowa338
I don't know if this is funny or terrible.
I'm going with F* funny!

@foone wow this wakes up ancient brain cells. con dates back to DOS. I recall using con com1 to send input to the command.com interpreter. I used it experimentally to run things on a second 8088 without needing a keyboard. It had limitations of course.

@foone @sabik as others have pointed out, you can use the DOS device path syntax (\\?\C:\...\con) to create forbidden filenames. it also works in powershell (not “Windows PowerShell”, but rather the open-source one that I think is officially called “PowerShell Core” but just calls itself “PowerShell”). it gets even wackier in Windows PowerShell though: as someone else pointed out, you can’t directly cd into it or anything, but you can cd \\?\C:\con, after which your working directory is Microsoft.PowerShell.Core\FileSystem::\\?\c:\con and anything that implicitly operates on the current directory doesn’t work anymore:

PS Microsoft.PowerShell.Core\FileSystem::\\?\c:\con> dir
dir : Cannot find path '\\?\c:\con' because it does not exist.
At line:1 char:1
+ dir
+ ~~~
    + CategoryInfo          : ObjectNotFound: (\\?\c:\con:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

@maia @sabik awesome. Thanks for your contributions to science