Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mtune!lzaz!psc From: psc@lzaz.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.sys.ibm.pc Subject: How do you read an MS-DOS directory? Message-ID: <63@lzaz.ATT.COM> Date: Wed, 13-May-87 12:06:57 EDT Article-I.D.: lzaz.63 Posted: Wed May 13 12:06:57 1987 Date-Received: Sat, 16-May-87 03:32:14 EDT Organization: AT&T Transaction Services, Lincroft NJ Lines: 22 Maybe I'm missing the point, but I can't see any way to read a directory (or subdirectory) using the DOS functions. The obvious thing is to just open "FOO" (or "FOO."), but I got an "Access denied" error code. I supposed I could use the BIOS diskette services to find the FAT, and chain my way through the root directory and any necessary subdirectories till I find my subdirectory, calculating the sectors by hand. No, I'm not getting burned by the "c:\newline\backsp" bug (where C programmers use backslash for DOS pathnames, and forget C also used backslashes for magic characters). I don't want to write to the directory, only see what files are in it and how long they are (without reading all of all the files), perhaps recursively. There are forty-two thousand versions of the UNIX(R) ls command for DOS, so it can't be *that* hard . . . unless there's a DOS stat() function in the C library you're using. There will be in the next version of the one I'm using, I hope. (Don't ask.) Follow up if you must, reply by mail if you can; I'll summarize. -Paul S. R. Chisholm, UUCP {ihnp4,cbosgd,allegra,vax135,mtune}!lznv!psc AT&T Mail !psrchisholm, Internet psc@lznv.att.com I'm not speaking for my employer, I'm just speaking my mind.