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


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?


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


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.


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.


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:


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


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:


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:


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


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