Xref: utzoo comp.sys.att:2841 comp.sys.misc:1303 Path: utzoo!mnetor!uunet!husc6!ncar!gatech!mcnc!decvax!decwrl!pyramid!prls!philabs!micomvax!zap!iros1!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.sys.att,comp.sys.misc Subject: Re: Seeking a method to "read" a DOS directory Message-ID: <1001@mcgill-vision.UUCP> Date: 14 Mar 88 13:52:56 GMT References: <902@cblpe.ATT.COM> Organization: McGill University, Montreal Lines: 22 In article <902@cblpe.ATT.COM>, jrm@cblpe.ATT.COM (John Miller) writes: > I would like obtain a list of files that are in a DOS directory using > Microsoft 'C', version 4 or 5. > The best method I know of so far [...] is to use a DOS interrupt > function to gain information about the FAT. [and then read the disk > to find the directory] One of the DOS interrupts expands a wildcard name. Tell it to expand *.* and you should get a list of everything. (Actually, one entry tells it "get the first name matching this" and another says "get the next name matching the last thing I told you to look for", as I recall.) Unfortunately, the match routine is rather badly broken. Asking for *C.*, for example, will return the same thing as *.*, regardless of whether the names in the directory contain `C'. Or at least it did for me. But for what you are doing, it should work to just give *.*. der Mouse uucp: mouse@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu