FAT32 root directory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Rocobo
Posts: 4
Joined: Wed Jan 02, 2019 5:18 am

FAT32 root directory

Post by Rocobo »

How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: FAT32 root directory

Post by alexfru »

Rocobo wrote:How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?
The same way as with any other (non-root) directory or file.
Follow the cluster chain starting at BPB_RootClus (I'm assuming you have fatgen103.doc).
Rocobo
Posts: 4
Joined: Wed Jan 02, 2019 5:18 am

Re: FAT32 root directory

Post by Rocobo »

alexfru wrote:
Rocobo wrote:How many entries there is in FAT32 ?
In the BPB the value of Root Directory Entries is '00 00'
How can i calculate how many entries i have in my disk ?
The same way as with any other (non-root) directory or file.
Follow the cluster chain starting at BPB_RootClus (I'm assuming you have fatgen103.doc).

no....
I just want loop over all entries and print the files name
so i need to know how many entries there is in the disk
Octocontrabass
Member
Member
Posts: 5586
Joined: Mon Mar 25, 2013 7:01 pm

Re: FAT32 root directory

Post by Octocontrabass »

The only way to tell how many entries is to read the entire root directory and count them.
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: FAT32 root directory

Post by BenLunt »

What my friends are saying is that FAT32 does not have a fixed root directory like FAT12 and FAT16 do. The FAT32 root directory is just like a sub-directory, it has Allocation Units and can be of any size up to the disk size (in theory).

Ben
- http://www.fysnet.net/osdesign_book_series.htm
Post Reply