How many files can i put in a single directory ??

Qzruh

Member
Sep 19, 2000
122
0
0
Actually, how many files can i put in a single directory on :
FAT partition
FAT32 partition
NTFS partition

is unlimited ? i dont think that way...
please help... or maybe explain

Andy
 

Elledan

Banned
Jul 24, 2000
8,880
0
0
As much MB as that filesystem can take. For FAT thus 512 MB, FAT32 more than 100 GB and NTFS even more than FAT32.
 

Qzruh

Member
Sep 19, 2000
122
0
0
Thx for the reply....
but, i meant not the file size...
like this, say, i have 8 gigs harddisk or more, can i place 8 million files each file is 1Kbytes, on it's root directory ?

that is for example... i wouldnt do that anyway:)

if i cant, how many files is the limit ?
 

crazychicken

Platinum Member
Jan 20, 2001
2,081
0
0
umm it seems like it would work in theory.... if you hade said 64 million 1 byte files, that would not be right cause fat32 is broken up in to 16bit(32?) sections that do not over lap

hope that helps
 

Adrian Tung

Golden Member
Oct 10, 1999
1,370
1
0
I'm not sure of the figures, but I do believe it is somewhere in 4 or 5 digits. I also think that the root directory is even more restrictive - perhaps 256 files or so? Don't quote me on this though, I'm not too sure about the figures too but I do know a limit does exist.


:)atwl
 

Whitedog

Diamond Member
Dec 22, 1999
3,656
1
0
Naw, that was older OSes where the root was limited. I know there is a limit, and you wouldn't even WANT to reach that limit. It kills your computer to read folders with lots of files in it.
I've seen folders with upwards of 12,000 files in it and it was Murder.
 

JkF

Junior Member
Mar 25, 2001
5
0
0
I know fat16 has a limit of 256 files in the root directory, but I don't know about fat32 or ntfs.
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
The root directory in FAT16 was limited to 255 files.

The maximum number of files that you can have in a FAT16 partition in total is 65525 files, assuming that you have just one directory that is not the root directory and that each file takes up one cluster in size.

Although 16 bits is equal to 65536, some clusters are needed to define the directory and partition information.

For FAT32, the largest number of files that you can have in a single directory is just under 4,294,967,296; again assuming that you have one single directory and that each file takes up one cluster in size.

Of course having so many files in one single directory is a very silly thing to do, as performance is VERY degraded.

An example of this is the IE5 Temporary Internet Files cache, where the cache is actually 4 separate directories. Since the time taken to look up the directory is reduced by splitting it into 4 parts, performance is increased, particularly when you have thousands of very small files.

FAT32 is not subject to the 255 file limit in the root directory.

Remember that clusters are needed for long file names as well, not just the data in the file. This is why often on a FAT16 partition the root directory will only have a maximum of around 80 files. The remaining 175 or so files have been taken up by the LFN segments.

 

YoungFart

Member
Nov 19, 2000
121
0
0
To keep a long story short - you cannot have more files than clusters.
Partition size (in KB) devided by a cluster size (in KB) = Max number of files (minus overhead, of course).
 

Kwad Guy

Diamond Member
Dec 1, 1999
3,478
0
0
Yeah, you can put a LOT of files in one directory, but you don't
want to. One time, I thought it would be nice to put a local
version of CDDB on my computer, to use when I wasn't logged
into the internet. Man, was that a mistake. Sure, I was able
to place it on the hard drive. But then, any utility that
had to scan the hard drive took FOREVER when it hit those
directories...Ultimately, I just wiped the disc and I will NEVER
try that again...

Kwad
 

Qzruh

Member
Sep 19, 2000
122
0
0
thank you folks...I got your point
Thx AndyHui, you explain very well

Well, i dont want to make my harddisk full of 1 cluster size files, it's for my paperwork :)


thx again
Andy
 

Mytv

Banned
May 12, 2000
422
0
0
Well in my FAT32 directory I have 10,500 files @ 400MBs.
My SCSI setup has no problem handling the stress.
 

pg22

Platinum Member
Feb 9, 2000
2,644
0
76
Somehow, some way, I found 54,100+ .msi files in my temp folder (in Win2k).

I don't even wanna tell you how long it took to delete :|
 

neuralfx

Golden Member
Feb 19, 2001
1,636
0
0
really you want to keep the number of files/dirs in the root dir, to a minimum, if you overload root you will lag performance.. well atleast you will definitely lag your boot up...
-neural