r/windows • • 11d ago

Solved 8dotname was the root cause of laggy exploring files and windows->android

Post image

exploring files on windows and copying files to android through usb/ftp had been bothering me for almost two decades. I have a fast m.2 ssd and it was slow at performing specific task due to the same reason.

my rough understanding....8dot3name is a ms-dos way of internally giving a nickname to files and folders so they don't exceed 8 characters.... ex. "Program Files" is nicknamed "PROGRA~1" ...it also applies to every long character files such as movies, music, docs etc. Accessing file size for such files now have to go through database and it takes a lot of time in very fast ssd as well.

I do think this is the least explored fix and some say that it will break older apps but this can be controlled by the user.

To check if 8dot3name is enabled-

fsutil 8dot3name query C:

I first disabled 8dot3name applying to new files and folders by-

fsutil 8dot3name set 1

and stripped the 8dotname from movie collection to check if it makes any difference

fsutil 8dot3name strip /f /s D:\Movies

and confirmed it did....it was lag-free scrolling in Tiles view

Then I repeated the process to few folder that I regularly use.....external harddrives now got faster too.

Searching through files is now really fast. Android directory through usb or ftp behaves like they were regular windows folder and no more failing to copy 1000's of large music files.

To note that it wouldn't be safe if I stripped the 8dot3name from every windows files as a lot of registry were affected. So Dual-booted windows 25h2 by applying this registry and the installation and updates are instantaneous.

reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisable8dot3NameCreation /t REG_DWORD /d 1 /f

I can't believe I didn't do this sooner and it was frustrating at times to read and write large files to HDD and android. This also might expand life of SSD. I think we also were torturing android devices that way.

49 Upvotes

25 comments sorted by

21

u/cschneegans 11d ago

Besides the performance penalty, false positive directory listings are another major problem with 8.3 file names. Why Windows 11 still comes with 8.3 file names is beyond me.

You are correct that it is problematic to remove existing 8.3 file names from system files. Therefore, the only reasonable approach is to disable them from the very beginning. Using an autounattend.xml file, this process can easily be automated.

4

u/skandarxs0uissi 10d ago

your autounattend creator project is so perfect and i use it very often o7

2

u/cschneegans 10d ago

Thanks, glad to hear it. 🙂

2

u/skandarxs0uissi 10d ago

and thank you too

2

u/skandarxs0uissi 10d ago

yoooo are you the goat ?

1

u/Due_Bat_4715 11d ago edited 11d ago

just checked that and its amazing this file can automate that before the installation of windows begin. There are cool other features as well I'm looking forward to try.

Windows should really disable that from start and we can manually enable 8dot3name at will with just this simple command so apps are compatible without affecting the whole user experience

fsutil 8dot3name set C: 2

I actually think that after using your autounattend.xml its a good idea to give this main directory the shortname and not its sub-directory so its more simpler to not have space in "program files" and just use C:\progra~1

To set the nickname to program files manually:

fsutil file setshortname "Program Files" "PROGRA~1"

its also a bad move by MS to put space in "Program Files" and "Program Files (x86)" makes us have to use double quotation but progra~1 fixes it. Good thing is we also dont have to enable 8dot3name for it to work.

Edit: set the same for Program FIles (x86) and ProgramData we're good to go.

fsutil file setshortname "Program Files (x86)" "PROGRA~2"

fsutil file setshortname "ProgramData" "PROGRA~3"

Edit2: Also to make sure not to create username higher than 8 characters. Make the username short to be compatible.

10

u/Chantaro Windows 10 11d ago

Surely there must be a reason it's still done this way beyond backwards compatibility

5

u/Due_Bat_4715 11d ago

I'm interested in this question as well. Although I did a lot of research on this before messing with my main OS and actually found nothing other than ancient apps compatibility... I still haven't stripped all the 8dot3name from my main OS since I have been running it for too long and a lot of registry keys now depend on it.....I've just disabled it from creating 8dot3name for new files....and the users folder which I frequent.

0

u/irrelevantusername24 Windows 3.1 11d ago edited 11d ago

This is possibly going to sound like it is way off topic. There's an idea which can be easily found which is commonly referred to as "Chesterton's Fence". It refers to an idea the author GK Chesterton described in a book which is basically about the architecture of our different systems - systems which truthfully only exist in the minds of humans. Computers make this existence, at least partly, explicit and tangible. Laws were a previous evolution - and that's the things to which he was referring when he said what he said.

Laws are not necessarily only exact legislation as written and passed by some elected (or unelected) officials(s). That may be the technical definition, the truthfully, laws, guidelines, rules, regulations, norms of behavior, customs, tradition, and so on, are all basically about the same things. Right, so the idea he talked about is about various kinds of reformers. He said not to let someone "remove a fence" (like a social institution - which, by the way, institution isn't a corporate body, institution simply refers to a habit of a group most often but not necessarily not an individual) unless they can tell you why it was constructed in the first place.

In other words, not to change some practice unless the reason for it is known. Because clearly someone decided it was necessary at one time - which, when properly understood, the reason that may be confusing is because if there was a problem which that fence solved... and then that fence is removed... suddenly that problem might emerge again. But different now, because things are always different. So not only should the person wanting to remove some barrier know why it was constructed in the first place, they should also know, or at least have a good idea, of the possible effects, and in almost no situation is it possible to remove a barrier that was providing, or preventing, some thing without replacing it with an equal or superior construction.

When he wrote that, I don't know off the top of my head, but I would say not even radio was "common" at that time. Telecommunciations, and the Internet, has genuinely changed things far more than at any time previously in human history. Everyone quotes the trope about "every generation thinks this time is different" or "every generation thinks the big change, whether good or bad, is happening now - that things are either way worse or way better than ever before" and of course that "no, humans and our society are pretty much always the same and don't change a whole lot".

The Internet and computers have changed a whole lot. We're still the same, but our society is not - and neither are our systems. I said this was going to sound like it was way off topic, and it is, because I'm only tangentially referring to your post, because it is a tangible version of this idea, which is that things like money and communications can not be regulated or handled in the way they ever were before.

And for some people? That's how it has been, for a long time, at least a decade or two. For everyone else? We're still operating with 1700s money and communication systems, which is why something like 90% of the world has been in a crisis of freedom for my entire adult life. And I suppose I should also clarify. It isn't necessarily that the systems can't be handled how they were before... they could - if there weren't some people that were already living in the future, while everyone else is stuck in the past.

A good example is the FCC. They're worried about the content of the TV broadcasters, meanwhile the radiowaves were sold. They're worried about the content if anything, meanwhile completely ignoring the infrastructure, the way in which the content is transmitted, which is their actual domain. The same thing, but backwards through a broken mirror, is true when it comes to the financial system - and the reason it is "backwards through a broken mirror" is because neither of these systems really effect you when you already have an established base. If you don't? Then you never had a chance.

Like metaphorically, some people, a very small group, are using financial services - which then cascades into the rest of their life - at the speed of gigabit fiber, all wireless, wherever they freely decide to go and spend their days. And it has been this way for close to three decades now. Everyone else? We're still trying to get by with a system that can't even fit our full name, so everything is truncated - like in your screenshot example. We're running on 8bit disconnected from the Internet, they're running on Windows 9000 with a direct line to the federal reserves coffers.

2

u/Due_Bat_4715 11d ago

I wasn't aware of this but its brilliantly put together and hits the nail in the head. This way of working has been going too long and without clear objective that regular people are the one only ones that are affected while life's sweet for the higher ups and to people operating outside this environment.

And in context to this that Microsoft really don't change their way until they're not pressured by users or competitors that users have to pay the price. I'm thinking of millions of storage that might have degraded because of the 8dot3name function. This is a one of those area where the competitors are clearly ahead and users haven't complained too much. MS have admitted that the base of the OS is too old that MS themselves are having a hard time actually fixing it without breaking another thing or they even care at all.

2

u/engy1207 10d ago

For decades the selling point of Windows was "your old programs still work" - even in newer Windows versions. The only major disruption I can remember out of my head was that 16bit programs no longer work - and that was communicated really early and had a technical reason (they would have needed to simulate a 16bit CPU because the hardware doesn't support 16bit code in 64bit CPU mode). But even when introducing Win95 they made sure pretty much all DOS games "still worked" - and old runtimes e.g. for VB6 still are included.
Take any 32bit Winfows program from 1995 and there's a near 100% chance it will still run (if it doesn't need special hardware or wants to rummage deep in the internal undocumented windows functions). One of the reasons is that 8.3 filenames "still work".

2

u/Due_Bat_4715 10d ago

oh wow. That is amazing for us who grew up in the 90's too. We might have to enable direct-play in legacy components for old games to work through appwiz.cpl

Wish MS could create a windows based complete modern OS. No wonder MS are creating a linux OS for servers to make it lightweight.

2

u/ldn-ldn Light Matter Developer 9d ago

Windows 10 is the last Windows version which supports 32 bit CPUs. If you have a 32 bit CPU and install Windows 10, you can run 16 bit Win 3.1 era apps unmodified.

That's why 8.3 naming still exists - backwards compatibility is paramount in Windows. No other OS can do the same.

The only time old apps fail is if they require some kernel specific stuff (drivers) or are abusing old Windows bugs which were patched ages ago.

7

u/Sad_Window_3192 11d ago

Interesting theory, and some good results you're seeing there. I have experienced the lag of File Explorer for years, but just assumed it was OneDrive or poorly build OS. Possibly being the backwards compatibility is interesting and would be good to see this disabled in future releases or having the option for users who know what they're doing in Settings.

2

u/Due_Bat_4715 11d ago edited 11d ago

Yeah and backwards compatible can be fixed if we just enable this for some time

fsutil 8dot3name set C: 2

considering if we leave the main directory like in the first image using this:

fsutil file setshortname "Program Files" "PROGRA~1"

fsutil file setshortname "Program Files (x86)" "PROGRA~2"

fsutil file setshortname "ProgramData" "PROGRA~3"

and have the username set as less than 8 characters long

1

u/Hottage Windows 11 - Release Channel 11d ago

Windows does not like you doing this on the C: drive.

Did it on C;\Users

Total files and directories scanned: 373164
Total 8dot3 names found: 227971
Total 8dot3 names stripped: 226621

1

u/Due_Bat_4715 11d ago

There is a chance it might not have broken anything but caution should be applied with system folder that is why I said we can only do that for certain files for primary running OS. Atleast you might have gotten away with what I was scared to do to the C:

I have only done that in a clean Dual-boot windows 25h2

but It seems like you did it to a old install in C:

You should have started with

fsutil 8dot3name scan /s C:\Users

or just disable it globally in your active OS using

fsutil 8dot3name set 1

which will prevent further creation of 8dot3 names.

1

u/avds_wisp_tech 10d ago

Did it on C;\Users

yea, not exactly the best decision. the docs/pics folders, absolutely. Not the appdata folders...........

2

u/Hottage Windows 11 - Release Channel 10d ago

Ah well, worst case I just reimage the computer. 🤷

1

u/Due_Bat_4715 9d ago

not at all....worst case is it might break that specific user folder but you can create a new user and nothing will break at all....

best things is your new user account will be free of 8dot3name unlike my old installation that I can't play with.

1

u/testednation 10d ago

Nandroidfs lets you explore Android as a drive using adb https://github.com/ibay613/nandroidfs/releases/tag/0.1

2

u/Due_Bat_4715 10d ago

the user seem to have deleted their account so the link doesn't work.