Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ptsfa!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!tim From: tim@j.cc.purdue.edu (Timothy Lange) Newsgroups: comp.sys.ibm.pc Subject: Re: How do you read an MS-DOS directory? Message-ID: <4227@j.cc.purdue.edu> Date: Sun, 17-May-87 09:45:52 EDT Article-I.D.: j.4227 Posted: Sun May 17 09:45:52 1987 Date-Received: Sun, 17-May-87 19:46:49 EDT References: <63@lzaz.ATT.COM> <956@bucsb.bu.edu.UUCP> Reply-To: tim@j.cc.purdue.edu.UUCP (Timothy Lange) Organization: PC Learning Resource Center, Purdue University Lines: 13 Using an extended FCB with the proper file name (or wild cards), and the attribute for 'directory' will allow you to find and open directory files. The thing I ran into was the size of the directory file is always returned as zero! No big deal though, you know you have at least one cluster to work with and when you find a directory entry that is all zeroes that is the end of the file. So I just reset the size to something large and write my code to detect end of file by looking at the values in each directory entry. I wrote my own directory alphabetizer once, so it can be done fairly easiely. -- Timothy Lange / PC Learning Resource Center / Mathmatical Sciences Bldg. Purdue University Computing Center / West Lafayette, IN 47907 317-494-1787 / tim@j.cc.purdue.edu