h-a-l-9000 wrote:I think they assign it depending on which number is availible at creation, Windows stores two names per file on the file system. […]
Show full quote
I think they assign it depending on which number is availible at creation, Windows stores two names per file on the file system.
Create PROGRA~1
Create PROGRA~2
Create PROGRA~3
Delete PROGRA~2
Remaining: ~1 and ~3
Yes, that is the way Win32 does it. When a new file/directory is created, it assigns the first available number after the ~. So if I created 3 directories called "Program Files", "Programming", & "Programable Options" in that order then they would come out like:
Program Files=PROGRA~1
Programming=PROGRA~2
Programable Options=PROGRA~3
If I changed the order it would come out differently:
Programable Options=PROGRA~1
Programming=PROGRA~2
Program Files=PROGRA~3
If I delete "Programming" in the last example, I would then only have 1 & 3 assigned. So, if I create "Program Runtimes" it would then become PROGRA~2, since 2 would then be the lowest avalable assignable number for PROGRA~ file names.
I'm not sure what would happen if I created more than 9 files/directories with the same first 6 letters. It has never come up for me 😒 Thinking of running a little experiment 😀