4

What would the deepest directory on a Windows operating system be called and how would one go about accessing it?

fixer1234
  • 27,064
  • 61
  • 75
  • 116
Rampaigh
  • 43
  • 1
  • 3

1 Answers1

4

It would still be called a directory and it would depend on your definition of "deepest". There is a path limit of 260 characters but that is not the actual limit of nested directories. There are APIs available that let you circumvent that limit but it depends on the software and how it's implementing file access.

To test it create a item (directory or file) with a name that is near that 260 character limit and move it into a folder so that it's still not exceeding the 260 character limit. After that you can Cut and Paste that folder into a folder with a longer name (so the path to the item would exceed that 260 character limit) and you would have a file which might be accessible by some (Total Commander) but not all Software (Explorer).

You could also look into the following SuperUser question for some insight on how many files can be stored using NTFS which is probably indicative of the max depth of a directory structure - assuming you don't store anthing else on a partition: Max files per directory on NTFS vol vs FAT32

How NTFS Works would suggest:

Files per volume 4,294,967,295 (2³² minus 1 file)

Seth
  • 9,000
  • 1
  • 19
  • 34
  • That is so interesting, I didn't know it can go past the limit. OK say I want to find paths that are an inversion of depth. So what I mean is: say I have a folder that is the root, how would I find stuff behind the root and not in the root? Also is it possible to snoop around the boot/root path of Windows? – Rampaigh Jan 11 '17 at 09:46
  • 1
    What are you actually trying to do? What do you mean by inversion of depth? You could just run `tree` from a `cmd` and look for the longest line(s) to get the longest and likely deepest paths. – Seth Jan 11 '17 at 09:52
  • How would I gain access to the boot manager directory? – Rampaigh Jan 11 '17 at 14:57
  • The better question would be why do you want to? Those directories are integral to the OS and usually should not be without a really good reason. Using the appropriate tools like `bcdedit` is in almost all cases a better idea. – Seth Jan 12 '17 at 06:30
  • It's just for learning purposes. Thanks a lot though. – Rampaigh Jan 12 '17 at 12:16
  • If you're interested in that post it as its own question as it's a different topic and make sure to include some information on what you already know about it or what specifically interests you about it. – Seth Jan 12 '17 at 13:13