Seeking a method to "read" a DOS directory

der Mouse mouse at mcgill-vision.UUCP
Mon Mar 14 23:52:56 AEST 1988


In article <902 at cblpe.ATT.COM>, jrm at 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 at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.sys.att mailing list