How many files can you put in a Windows folder without a noticable performance degradation?

27

4

I'm guessing there's no hard limit, but I know that performance degrades when you put too many files into a single Windows folder. Does anybody have any good rules of thumb for when it becomes noticeably slow to open a file?

Mark Ransom

Posted 2009-07-16T22:27:49.270

Reputation: 2 010

perhaps the title of this question could be amended to include a "without noticeable performance degradation"? – Ron Tuffin – 2009-07-31T08:26:45.247

related: https://superuser.com/q/453348/453247

– Stephen R – 2018-06-27T18:38:53.097

Answers

18

Assuming NTFS here, in which case the technical limit is around 4 billion files. And until you go over 10s of thousands per directory you really should not worry too much.

Note however that programs like Explorer suffer much sooner than 10s of thousands, because they try to access all files in a given directory to get meta-data, etc.

jerryjvl

Posted 2009-07-16T22:27:49.270

Reputation: 2 505

In my testing here on Win 7 Explorer is actually faster than some other tools that allegedly are more efficient. – Joey – 2009-07-16T23:44:25.653

I haven't played with Win 7 yet, but mainly for lack of time and a good machine. I'm glad they appear to have invested some time in improving Explorer then. – jerryjvl – 2009-07-16T23:49:41.833

13

Opening a file won't be very slow regardless of how many files you have in a folder. What certainly is going to kill you is enumerating files in that folder. So taking a look at the contents of that folder with Explorer, Far, dir, Get-ChildItem, whatever.

That being said, I have around 2.5k files and folders in my temp folder and display is instantaneous, so that's apparently still a small number.

ETA: Ok, just tried it, 10000 files in a folder take around one second to open that folder in Far, this and 20000 files don't even matter in Explorer.

Joey

Posted 2009-07-16T22:27:49.270

Reputation: 36 381

@JoelCoehoorn: SMBv2 worked wonders on our machines. – surfasb – 2011-11-30T20:58:00.143

6Just wait until you start doing that over a network. A couple apps I have to maintain like to archive everything in the same place: 100,000 or more files. Don't even think about opening that folder in explorer. – Joel Coehoorn – 2009-07-16T22:48:40.950

Ok, agreed there. For local folders it doesn't matter apparently, I just let my copy nul %i run to 100k and Explorer takes about 1 second to open that folder, sorting the files takes a fraction of a second longer. – Joey – 2009-07-16T22:52:04.623

11

Look here. It says for files per volume, not per folder.

  • NTFS: 2^32 - 1 = 4.294.967.295 files
  • FAT: Approximately 4 million

FerranB

Posted 2009-07-16T22:27:49.270

Reputation: 1 059

1

I use Windows 10, and 25,000 images in one folder (average size of the file is 500 KB took more than an hour to load completely in the folder. The suggested number of files in one folder is 5000.

Gia

Posted 2009-07-16T22:27:49.270

Reputation: 11

1

I had trouble some years ago with a directory which had about 30000 files, and new files couldn't be written (it was the "temp" directory of eMule...), it was on a FAT32 partition, but it's possible that I was using Win98 at the time, and that it was a limit of the OS itself.

Gabriel

Posted 2009-07-16T22:27:49.270

Reputation: 61

32767 is a special number because it's the maximum that representation in a 16-bit signed value; "about 30000" is close enough. – Mark Ransom – 2011-07-26T18:57:34.280

0

10 yrs old thread but I only discovered the limits per se today on latest Windows 10 build 18362.356 . Its about 150,000 . I have about 700,000 .7z files each size 24KB in the root of my 4 TB WD BLUE's 2 TB partition and the explorer takes about 3-4 minutes to load all the files in the window and takes about 1 min selecting them but dies when i do any operation with them such as opening properties or pressing ctrl+x . I can select upto 150K files at best when it somehow responds with more than a minute of delay but any more than that and its just dead , atleast for hours when i come to check and find the selection done .

CryO ELITE

Posted 2009-07-16T22:27:49.270

Reputation: 1

0

It depends on the file system. NTFS is way better than FAT32. FAT32 has a hard limit. However, the rule of thumb I go by is about 500 per directory.

Joel Lucsy

Posted 2009-07-16T22:27:49.270

Reputation: 121

2I have image folders with several thousand images in a single directory, and audio folders with even more. 500 is a very very low limit for a windows folder. – TheTXI – 2009-07-16T22:38:09.243