Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!oddjob!gargoyle!ihnp4!ihlpe!psfales From: psfales@ihlpe.ATT.COM (Peter Fales) Newsgroups: comp.sys.ibm.pc Subject: Re: How do you read an MS-DOS directory? Message-ID: <1751@ihlpe.ATT.COM> Date: Tue, 19-May-87 10:56:47 EDT Article-I.D.: ihlpe.1751 Posted: Tue May 19 10:56:47 1987 Date-Received: Wed, 20-May-87 05:26:53 EDT References: <62@lzaz.ATT.COM> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 19 In article <62@lzaz.ATT.COM>, psc@lzaz.ATT.COM (Paul S. R. Chisholm) writes: > > 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. The standard trick is use the DOS functions "find first" and "find next" to find all files which match "dir/subdir1/subdir2/*.*" or whatever. It is likely that your compiler library has functions to simplify this procedure. In my compiler they are called opendir() and readdir(), I believe the names are stolen from similar functions under BSD UNIX. -- Peter Fales UUCP: ...ihnp4!ihlpe!psfales work: (312) 979-7784 AT&T Information Systems, IW 1Z-243 1100 E. Warrenville Rd., IL 60566