News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Deepest nesting level of folders

Started by jj2007, May 13, 2024, 09:02:12 PM

Previous topic - Next topic

jj2007

Theoretically, the nesting level of folders is limited only by the 32767 characters limit. Which is the deepest level you've ever seen in practice?

sinsi

Visual Studio and Windows SDKs can get 12 or so levels deep. Long filenames too.
🍺🍺🍺

jj2007

Thanks, Sinsi, sounds good :thumbsup:

I am working on a new implementation of GetFiles and was wondering how much stack space I need for the recursion.

sinsi

To be absolutely sure, allocate some memory with HeapAlloc for each recursive call.
Not really any overhead and you can still address it with a register.
🍺🍺🍺

jj2007

That was exactly what I wanted to avoid, as it is somewhat slower than StackBuffer().

Vaguely related: dir /b /s C:\Windows\WinSxS\Backup\*.dll >1.txt finds (inter alia) this path:

C:\Windows\WinSxS\Backup\wow64_microsoft-windows-uxtheme_31bf3856ad364e35_10.0.19041.3996_none_24b66de1f057bd20_uxtheme.dll_9f6cda06

Search for _uxtheme.dll_ in your C:\Windows\WinSxS\Backup\ folder. What's your opinion, does ....dll_9f6cda06 have the dll extension?


sinsi

Strictly speaking, no, it has a dll_9f6cda06 extension. The contents would show that it is a DLL file, though.
Windows Explorer shows it that way and the icon is a generic icon, not the Application Extension one.

Short name, long name, just to confuse the issue :biggrin:
QuoteAMF437~1.DLL
amd64_microsoft-windows-uxtheme_31bf3856ad364e35_10.0.22621.3447_none_85cdbc9d82238346_uxtheme.dll_9f6cda06
🍺🍺🍺

jj2007

Quote from: sinsi on May 13, 2024, 11:58:00 PMStrictly speaking, no, it has a dll_9f6cda06 extension.

Yep, that's what I thought, too. Maybe searching for *.dll should not find the file, but searching for *.dll* should.

Similar: .inf_loc (there are plenty of them in WinSXS). One could argue that it's a "fixed" ending, while .dll_9f6cda06 is "variable" :cool:

sinsi

After some more tests the maximums I've found are deepest level is 26 and longest path is 504 (AdobeTemp for both)
🍺🍺🍺

jj2007

Thanks, so using the stack for the recursion will be no problem :thumbsup: