Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum Number of files in Flash Drive Root Dir

Status
Not open for further replies.

ockerb

Technical User
Oct 11, 2002
139
0
0
Hi
I have 1GB and 2GB flash Drive and I tried to fill both with MP3 songs. I can only get around 400MB of files on each one which equates to about 120 songs. This is the same for both drives.
Is there a limit to the number of files that can be in the root directory of flash drives? They are bot FAT format. Putting files into folders is not an option for me. Any ideas to better utilise all that space?
 
An MS-DOS FAT root directory contains a separate entry for every file and folder it contains. These directory entries contain information such as the file name, extension, attributes, time and date the file was last modified, the starting cluster number, and the file size. Each directory entry uses 32 bytes to store this information. Because the root directory is 16K in size, it can contain a maximum of 512 directory entries, which are 32 bytes each.

But:

. if the filename is long; i.e. not 8.3 complaint, at least one additional directory entry is required to store the 8.3 equivalent name;

. Any file whose name contains more than 13 characters requires 3 or more directory entries. E.g. a 14 character long filename would require 3 directory entries; a 27 character long filename would require 4 entries; .etc


Thus you could quickly exhaust the 16K alloted directory space with far fewer than 512 filenames.



____________________________
Users Helping Users
 
What file system is the drive formatted in FAT or FAT32?

Can you get more files on it if it is formatted as FAT32?

In Vista there is even the option to format as NTFS.

Errors Creating Files or Folders in the Root Directory

Description of the FAT32 File System

Ed Bott's Windows Expertise - A Windows brain-teaser
 
Thanks Gents
I renamed all the files to "number".mp3 up to 270.mp3 and had no problems fitting all of them onto my 1GB flashdrive. Now I can enjoy all the music that I like when I'm driving my car.
Thanks for your help :)
Ockerb
 
One approach to solving the problem is to create a folder under the root (e.g., "D:\MyMP3") and store you files in that folder. Under these circumstances, you should not encounter limitations on the number of files that can be stored. In other words, the comments above by bcaster apply to the root folder but not to its subfolders.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top