max number of files in a folder/directory

G

Guest

Hello

What is the total number of files allowed in a Windows 2000 & Windows XP directory

Thanks!
 
P

Pat [MSFT]

No hard limit, could be in the millions. The real limitation is how the
folders are managed. If you plan to rely on Explorer (or other GUI system)
the limit is how long you are willing to wait for the enumeration to occur
(think minutes or hours for a large file count). If you are storing files
that are only read by an application (i.e. direct lookup/no enumeration)
then it isn't a big deal.


Pat
 
D

Dan

With NTFS 4 there was a known limit...you could go way
over it, but for all practical purposes, Microsoft
recommended that you keep it to 15000-20000 items in a
directory. It was suggested that the practical limit is
50000 items for Windows 2000. I was given this
information by several Microsoft people, but I can't find
any articles. Does anyone know of any?

Thanks
 
P

Pat [MSFT]

To expand just a bit, NTFS relies more or less on a BTREE to locate files,
using directories as an index. So, if you double the number of files, it
increases the worst case recursion count by 1. So, if you have 1 million
files in a directory, NTFS may need to do (at most) 20 lookups to find it
(2^20 ~=1million). But, going to 4 million would only induce 2 more (2^22
~= 4million). We have quite a few folks running in the 100k-->1million
range OK, but they are not relying on GUI based file management. Normally
these files are programmatically accessed (e.g. web server image storage)
and perf is acceptable. I know of a few with 5 million files and normal
operations are OK. Backups/Restores are actually the problem there and when
you get into the large file counts (millions), file level backups begin to
not do very well (volume level backups are necessary due to the seek
overhead of jumping between files).

I am a bit curious about what the original poster's actual needs are. How
many files are we talking about? How are they being created (i.e.
consolidation from multiple other machines, programmatically created, etc.)?


Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top