Page 1 of 1

FAT32 root directory

Posted: Sun Mar 03, 2019 1:37 pm
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 ?

Re: FAT32 root directory

Posted: Sun Mar 03, 2019 2:19 pm
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).

Re: FAT32 root directory

Posted: Sun Mar 03, 2019 2:29 pm
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

Re: FAT32 root directory

Posted: Sun Mar 03, 2019 6:59 pm
by Octocontrabass
The only way to tell how many entries is to read the entire root directory and count them.

Re: FAT32 root directory

Posted: Sun Mar 03, 2019 11:21 pm
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