Path: utzoo!attcan!uunet!mcsun!unido!rwthinf!cip-s03!berg From: berg@cip-s03.informatik.rwth-aachen.de (Solitair) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: First sector of the file area Message-ID: <3050@rwthinf.UUCP> Date: 2 Jul 90 11:51:08 GMT References: <29744@eerie.acsu.Buffalo.EDU> Sender: news@rwthinf.UUCP Lines: 21 acsoyuw@ubvmsd.cc.buffalo.edu writes: >>do the sector/cluster/file calculation. Anybody know how I can find out >>the sectore number of the first sector of the file area of a hard disk >You can read the File Allocation Table, it's all in there. >On a 20 meg hard disk, the FAT of the root directory should be at sector 83. >And the sub-directries of the root directory should be at sector 300s. >(Please correct me if I'm wrong) You're wrong (well, partially anyway). The way to follow is this: Read the partition sector on the hard-disk, determine from it the boot sector of the partition you want to access. Then read that boot sector, extract from it all the info you want (i.e. sector size, cluster size, partition size, start of FAT, size of FAT, start of root dir, start of file data area, ...) Look up the format of the partition and boot sector in for example the infamous INTERRUP.LST, available at a site near you! -- Sincerely, |"I code it in 5 min, optimize it in 90 Stephen R. van den Berg. | min, because it's so well optimized: uunet!mcsun!unido!rwthinf!cip-s01!berg | it runs in 5 only min. Actually, most berg@cip-s01.informatik.rwth-aachen.de | of the time I optimize programs."