When you have thousands or millions of files in a single directory, there can be drawbacks.

A strategy is to avoid that situation is to distribute the files into sub-folders whose name is for instance the first few letters of the filename, or the first few letters of the filename's hash. That allows the file to be easily findable, while having no more than n files per folder. Example:





This is a very frequently used technique. Is there an English name for it? If not, what is the nearest word or expression that encompasses it?

  • What is the name in your language? Sometimes a translation works (sometimes not). – Mitch Mar 28 '17 at 12:40
  • @Mitch: In this field my language is English, so I don't have a name for that, sorry. – Nicolas Raoul Mar 28 '17 at 14:13
  • Engineering note: This idea may backfire; you might actually want /ab/cd/ef instead. The goal is to have name diversity in each directory. – MSalters Mar 28 '17 at 14:37

I think this is simply called a hashed directory structure (or hashed folder structure if you're talking Microsoft). Even your example is still using a hash function (an alphabetic one based on the file name), so the terminology still applies.

  • 2
    Eddie - this looks good but can you add a link or reference for this? – k1eran Mar 28 '17 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.