Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Laughs in C:\PROGRA~1\ (try it, still works in Windows 10)


Apart from what others mentioned, that can only work if the file system automatically creates 8.3 names. NTFS does not necessarily do that (https://docs.microsoft.com/en-us/windows-server/administrati...)


There is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.


Well, on my disk PROGRA~1 is "Program Files" and PROGRA~2 is "Program Files (x86)", so still works :)


That order is not guaranteed consistent across installations, however.


I wonder if code to this effect has ever been written before

  for (int i = 1; i < INT_MAX; i++) {
    if (dirExists("C:\\PROGRA~%d\\ProgramName", i)) {


And that, children, is when marginalia_nu unlocked the seventh circle of the inferno. Tomorrow we'll read the story of how our new demon overlords forced us all back to Windows 3.1.


Win 3.1? on DOS 6.22? Actually, this sounds like heaven. Just don't put it on the public 'tubes.


Or do. Can’t hack a Mac Classic web server!


Got to tweak HIMEM.SYS before the slumbering one can be awakened.


PEEK and POKE could break the HIMEM.


For whatever it’s worth, this is a terrible idea, for so many different reasons:

https://web.archive.org/web/20100107184218/http://blogs.msdn...

And so, yes, I’m certain someone must have done it, because it’s clearly bad idea jeans and so Murphy’s Law says it must exist.


Can that work for i > 9 ?


If you mkdir PROGRA~10, yes!


And on mine (Windows 11) "PROGRA~3" is "ProgramData"


Truly lifesaving for when she'll quoting gets in the way.


You've got a stray single quote in your shell. :)


That was a typo, but it seemed like a perfect illustration of my point, so I left it in.


Typo? I would guess it’s autocomplete at work. iOS does that all the time for me.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: