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.

How many files can a folder contain? I have 30k folders inside 1 folder. Each of the folders has 1 image file. Is there a limit on the number of files a folder can store?

I am using Windows Server 2003, IIS6.

share|improve this question
add comment

3 Answers

There's no practical limit on the combined sizes of all the files in a folder, though there may be limits on the number of files in a folder. More importantly, there are limits on individual file size that depend on what filesystem you're using on your hard disk. (The "filesystem" is nothing more than the specification of exactly how files are store on disk.)

Let's break this down by file system:

•FAT aka FAT16

FAT, for File Allocation Table, is the successor to the original FAT12 filesystem that shipped with MS-DOS many, many years ago.

◦Maximum disk size: 4 gigabytes

◦Maximum file size: 4 gigabytes

◦Maximum number of files on disk: 65,517

◦Maximum number of files in a single folder: 512 (if I recall correctly, the root folder "/" had a lower limit of 128).

•FAT32

"There's no practical limit on the combined sizes of all the files in a folder, though there may be limits on the number of files in a folder."FAT32 was introduced to overcome some of the limitations of FAT16.

◦Maximum disk size: 2 terabytes

◦Maximum file size: 4 gigabytes

◦Maximum number of files on disk: 268,435,437

◦Maximum number of files in a single folder: 65,534

•NTFS

NTFS, or "New Technology File System" introduced with Windows NT, is a completely redesigned file system.

◦Maximum disk size: 256 terabytes

◦Maximum file size: 256 terabytes

◦Maximum number of files on disk: 4,294,967,295

◦Maximum number of files in a single folder: 4,294,967,295

Note that when I say "disk" above, I'm really talking about "logical" disks, not necessarily physical. No one makes a 256 terabyte disk drive, but using NTFS you can treat an array of disk drives as a single logical disk. Presumably if you have enough of them, you can build a huge logical drive.

Also note that the NTFS's 256 terabyte limitation may well simply be an implementation restriction - I've read that the NTFS format can support disks up to 16 exabytes (16 times 1,152,921,504,606,846,976 bytes).

Source

share|improve this answer
1  
You may want to site your source. –  John T Feb 3 '10 at 13:55
    
If max disk size for FAT32 is 256 terabytes, then why the limit of 32 GB for making a partition? –  Ganesh R. Feb 3 '10 at 14:37
add comment

Note: Assuming NTFS, as no one in their right mind would use FAT for anything else than USB thumb drives or memory cards, let alone on a server (ok, that thought is scary).

Yes, there is a limit. Storing more files than particles in the universe may prove impractical. However, the actual limit is far lower.

NTFS has a maximum of 4,294,967,295 (232 − 1) files per volume. A few of those are already used by the file system itself and folder should count as files too.

30,000 aren't that many files, actually. But Microsoft recommends that you turn off auto-generation of DOS-compatible short names if you move past 300,000 as finding a unique short name gets difficult then.

share|improve this answer
    
Hmm the recommendation applies to NT 3.5. It does not mention any new Operating Systems. –  Ganesh R. Feb 3 '10 at 14:40
1  
That fact hasn't changed since then. Short name generation is still there and the underlying problem of finding a short name still remains once there are too many of them—simply because they are ... well ... short :-) –  Јοеу Feb 3 '10 at 17:58
add comment

If you're using NTFS, then no, there is no real limit.

Performance will suffer in other ways: trying to open a folder with 30k sub-folders will suck enormous amounts of time.

FATXX has limits.

Other modern file systems, no real limit.

share|improve this answer
1  
Where do you get the idea that 30k subfolders "sucks enormous amounts of time"? Opening such a folder (with 50k subfolders) takes a second in Explorer, another second to sort correctly. In FAR Manager it takes about 1 second to open that folder. –  Јοеу Feb 3 '10 at 13:59
2  
I can see why he would say that. If you are using thumbnail view, Windows will attempt to display a thumbnail of the contents of each folder. Though in thumbnail view you're unlikely to see more than a dozen or so folders on screen at any one time. –  Kenneth Cochran Feb 3 '10 at 14:45
    
Yes, I though of that after I'd written this. A view of folders won't take long. Thumbnail view... will. –  SuperMagic Feb 3 '10 at 16:40
add comment

Your Answer

 
discard

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