DOS Fn 11H: Find 1st Matching File via FCB
Expects: AH 11H
DS:DX address of an unopened FCB (filespec may contain '?'s)
Returns: AL 00H if a matching filename found (and DTA is filled)
ffH if no match was found
Info: The DOS default directory is searched for a file that matches
that in the FCB pointed to by DS:DX. AL returns 0ffH if no match
If a match is found, AL returns 00h, the DTA is filled with the
first byte as the drive (A=1, B=2, etc.) and the DirEntryRec of
the file is stored in the next 32 bytes.
You can use an Extended FCB in the call to select specific files
with specific file attributes. In this case, the DTA is filled
with 0ffH, 7 bytes of 00s, the drive number, and the dir entry.
In either case, the DTA is filled with a valid, unopened FCB.
Use DOS Fn 12H Find Next FCB to search for additional matches.
Notes: ■ If you intend to search for more files, don't perform any I/O
operations on a "found" file. Copy the FCB somewhere else
before opening it.
■ The DOS 2.0+ function 4eh Find 1st File is easier to use and
employs normal d:\path\filespec format.
■ Although this fn has been superseded, it is still useful for
programs that play around in DoubleSpace CVFs (see CVF Layout)
since it returns the "starting cluster number" for a file.
COMMAND.COM itself uses this in processing Dir /C.
See Also: Fn 1aH (set DTA)
Fn 4eh (find first file)
Directory and File Functions