News for hackers. Stuff that matters.
Re:I'm “still afraid to use spaces in file names” years old by 323 on Thursday November 11, 2021 @09:19AM (#29188065)
Laughs in C:\PROGRA~1\ (try it, still works in Windows 10)
Re:I'm “still afraid to use spaces in file names” years old by Someone on Thursday November 11, 2021 @10:29AM (#29188893)
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...)
Re:I'm “still afraid to use spaces in file names” years old by the_mitsuhiko on Thursday November 11, 2021 @09:24AM (#29188112)
There is no guarantee that the short name has that. In fact on a lot of German Windows installations it was PROGRA~2.
Re:I'm “still afraid to use spaces in file names” years old by 323 on Thursday November 11, 2021 @09:25AM (#29188122)
Well, on my disk PROGRA~1 is "Program Files" and PROGRA~2 is "Program Files (x86)", so still works :)
Re:I'm “still afraid to use spaces in file names” years old by floatingatoll on Thursday November 11, 2021 @09:34AM (#29188208)
That order is not guaranteed consistent across installations, however.
Re:I'm “still afraid to use spaces in file names” years old by marginalia_nu on Thursday November 11, 2021 @10:06AM (#29188589)
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)) {
Re:I'm “still afraid to use spaces in file names” years old by gmfawcett on Thursday November 11, 2021 @10:28AM (#29188883)
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.
Re:I'm “still afraid to use spaces in file names” years old by jagged-chisel on Thursday November 11, 2021 @11:00AM (#29189379)
Win 3.1? on DOS 6.22? Actually, this sounds like heaven. Just don't put it on the public 'tubes.
Re:I'm “still afraid to use spaces in file names” years old by floatingatoll on Thursday November 11, 2021 @11:21AM (#29189686)
Or do. Can’t hack a Mac Classic web server!
Re:I'm “still afraid to use spaces in file names” years old by marginalia_nu on Thursday November 11, 2021 @01:48PM (#29191499)
Got to tweak HIMEM.SYS before the slumbering one can be awakened.
Re:I'm “still afraid to use spaces in file names” years old by aksss on Thursday November 11, 2021 @07:09PM (#29194879)
PEEK and POKE could break the HIMEM.
Re:I'm “still afraid to use spaces in file names” years old by floatingatoll on Thursday November 11, 2021 @11:21AM (#29189676)
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.

Re:I'm “still afraid to use spaces in file names” years old by benibela on Thursday November 11, 2021 @09:18PM (#29195652)
Can that work for i > 9 ?
Re:I'm “still afraid to use spaces in file names” years old by floatingatoll on Friday November 12, 2021 @04:36AM (#29197648)
If you mkdir PROGRA~10, yes!
Re:I'm “still afraid to use spaces in file names” years old by TowerTall on Saturday November 13, 2021 @11:02PM (#29215275)
And on mine (Windows 11) "PROGRA~3" is "ProgramData"
Re:I'm “still afraid to use spaces in file names” years old by selfhoster11 on Thursday November 11, 2021 @09:47AM (#29188361)
Truly lifesaving for when she'll quoting gets in the way.
Re:I'm “still afraid to use spaces in file names” years old by kijin on Thursday November 11, 2021 @11:32AM (#29189850)
You've got a stray single quote in your shell. :)
Re:I'm “still afraid to use spaces in file names” years old by selfhoster11 on Thursday November 11, 2021 @11:49AM (#29190069)
That was a typo, but it seemed like a perfect illustration of my point, so I left it in.
Re:I'm “still afraid to use spaces in file names” years old by Someone on Thursday November 11, 2021 @12:39PM (#29190691)
Typo? I would guess it’s autocomplete at work. iOS does that all the time for me.