Max files per directory on NTFS vol vs FAT32

67

9

What's the max number of files that can be present in a directory on a NTFS volume? Same question for a directory for FAT32 volume?

Gaurav

Posted 2010-03-12T13:48:35.827

Reputation:

I seem to recall a hard limit for the root directory of both filesystems and a soft limit (disk size) for child directories. – lexu – 2010-03-12T13:54:57.917

1Ok I found one part of the answer. For FAT32: max number of files in a directory is 65,534 (The use of long file names can significantly reduce the number of available files and subfolders within a folder.)

Does anyone know the answer for NTFS? – None – 2010-03-12T14:03:33.403

According to MSDN (http://technet.microsoft.com/en-us/library/cc781134(WS.10).aspx) there can be atleast 300k files in a folder. I suspect that on NTFS max files per folder is limited only by max files per NTFS vol.

– None – 2010-03-12T14:09:24.513

Answers

91

After a quick search on google I found these:

FAT32

  • 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:

  • 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

References:

good man

Posted 2010-03-12T13:48:35.827

Reputation:

2

"Maximum number of files in a single folder: 65,534 (FAT32)" - This limit would seem to be dependent on the length of the filenames. Specifically, if you are using LFNs (ie. not just the 8.3 short names). The short name and each 13 byte block of the LFN are stored in separate directory entries, which can greatly reduce the actual number of files that can be stored. Reference: http://help.lockergnome.com/windows2/file-folder-limits--ftopict450749.html

– MrWhite – 2015-11-27T16:31:21.073

1Archive of dead lockergnome link. – John B – 2016-07-05T22:49:32.937

10

NTFS: There is no fixed limit. The maximum number of files is one upper limit. This limit is either 2^23-1 (according to many driver implementations) or 2^48 -1 (according to the MFT_REF structure). As you will have LARGE directories, you will see non-resident $BITMAP_ALLOCATION streams, a large INDEX stream. The index stream is essentially a B+ tree of file names.


FAT32: There is a difference between the root directory and sub-directories. The root has certain limitations.

Dominik Weber

Posted 2010-03-12T13:48:35.827

Reputation: 285

0

With Windows Server 2012 R2, NTFS has exceeded 232 (slightly over 4 billion).  I am currently running a document imaging server with almost 5 million files, as shown below.  I am running NTFS and NOT ReFS, which I know can hold 264 files.  NTFS on Windows 2012 R2 can hold more than 232 files.

PS E:\> chkdsk /v
The type of the file system is NTFS.
Volume label is Data.

WARNING!  F parameter not specified.
Running CHKDSK in read-only mode.

Stage 1: Examining basic file system structure ...
  4992768 file records processed.
File verification completed.
  27 large file records processed.
  0 bad file records processed.

John Groselle

Posted 2010-03-12T13:48:35.827

Reputation: 11

45 million < 4 billion – mwfearnley – 2016-11-25T09:07:55.683

-1

I just tried to move files to a flash drive. I don't have a count but between 64 and 128 is the max that Windows 7 will do. W7 sugests that I put the remaining files in a new directory.

Neil Murphy

Posted 2010-03-12T13:48:35.827

Reputation: 11

Without information whether this refers to NTFS or FAT32, and to the root or a subdirectory, this is useless. – RalfFriedl – 2019-01-05T01:30:23.777

64 and 128 what? It certainly isn’t 64 files. Without any documentation to backup your answer, this answer, has much to be desired – Ramhound – 2019-01-05T01:41:43.220

I cannot truthfully say what FAT it was. Bleeping Windows! – Neil Murphy – 2019-01-11T00:02:39.307