Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using windows 7 64-bit on q6600 with 4gb ram.

I have a folder with 2 million files which are 10kB on average.

windows 7 explorer stops responding when I open the folder.

how can I overcome this?

share|improve this question
13  
By not storing two million files in the same folder... –  Daniel Beck Jan 23 '12 at 16:02
    
To be a little more clear than that comment, I'm not an expert on this but I believe NTFS is simply not designed well for that many files in one folder. It doesn't scale very well and simply enumerating the contents of the folder can take forEVER. –  Shinrai Jan 23 '12 at 16:15
2  
You know whats even worse.. trying to delete that folder.. good luck :( –  ppumkin Jan 23 '12 at 16:20
1  
@Shinrai, as Roger notes in his answer, NTFS is fine, it's Explorer that has a lot of work to do when you open the folder. –  dsolimano Jan 23 '12 at 16:56
1  
@dsolimano - That's why I left answering to folks more knowledgeable than myself. :) –  Shinrai Jan 23 '12 at 17:55

2 Answers 2

up vote 10 down vote accepted

You can overcome it by using a more sensible structure for your files. While Explorer will support directories with millions of files, it isn't designed for this sort of scenario and performance will be slow.

For more info, see this TechNet article:

http://technet.microsoft.com/en-us/magazine/hh395477.aspx

share|improve this answer
    
I like Raymond's explanation. I would be angry if Microsoft spent money testing Explorer on such a niche situation. –  surfasb Jan 24 '12 at 9:31
    
imho, official guidelines and/or system warnings would be more appropriate than a (non-)apologetic technet article. –  eyaler Jan 25 '12 at 17:14
    
It just the filesytem restriction.. it was flawed since NTFS was made, then they tried fixing ti with indexing.. but is sitl rubbish, ZFS forward –  ppumkin Jan 25 '12 at 17:30
    
It's not a filesystem restriction - it's a display problem. NTFS can store an unlimited number of files per volume. The issue is that it's very difficult to build a UI that will display a directory of two million files - and why should MSFT worry about this? Who's going to page through so many files? –  Roger Jan 26 '12 at 19:20

Sorry, Windows cannot handle more than 80 thousand files in a folder, neatly and efficiently (On a Xeon 2.8Ghz server with 4GB RAM at least)

It starts to crash and burn near 60k.

At 200k it takes 2 days to enumerate the folder. We had this problem with badmail folder using Windows Exchange. The only way to overcome it is to make thousands of folders (that it can handle fine) with files inside those folders with more folders.

Otherwise you should seriously consider dumping that data into a SQL file, using SQLExpress which is free or MySQL which is also free. Write a small program to handle it and you will be good to go - that's what we did with our 200k files and now we have over 12 million emails sorted, with quick access.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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