Table of Contents
Note: This API call is for DOS and Win16 personality only. Use Family API for portability.
Int 21H, AH=4EH
Version
2 and higher
Brief
“FINDFIRST” - FIND FIRST MATCHING FILE
Family API
Input
AH = 4Eh AL = special flag for use by APPEND (refer to note below) CX = file attribute mask (see #01420 at AX=4301h) (bits 0 and 5 ignored) 0088h (Novell DOS 7) find first deleted file DS:DX -> ASCIZ file specification (may include path and wildcards)
Return
CF clear if successful Disk Transfer Area filled with FindFirst data block (see #01626) CF set on error AX = error code (02h,03h,12h) (see #01680 at AH=59h/BX=0000h)
Notes
- for search attributes other than 08h, all files with at MOST the specified combination of hidden, system, and directory attributes will be returned. Under DOS 2.x, searching for attribute 08h (volume label) will also return normal files, while under DOS 3.0+ only the volume label (if any) will be returned.
- this call also returns successfully if given the name of a character device without wildcards. DOS 2.x returns attribute 00h, size 0, and the current date and time. DOS 3.0+ returns attribute 40h and the current date and time.
- immediately after an INT 2F/AX=B711h (APPEND return found name), the name at DS:DX will be overwritten; if AL=00h on entry, the actual found pathname will be stored, otherwise, the actual found path will be prepended to the original filespec without a path.
- under LANtastic, this call may be used to obtain a list of a server's shared resources by searching for “\\SERVER\*.*”; a list of printer resources may be obtained by searching for “\\SERVER\@*.*”
- under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
BUGS
- under DOS 3.x and 4.x, the second and subsequent calls to this function with a character device name (no wildcards) and search attributes which include the volume-label bit (08h) will fail unless there is an intervening DOS call which implicitly or explicity performs a directory search without the volume-label bit. Such implicit searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK (AH=41h), and RENAME (AH=56h)
- DR DOS 3.41 and 5.0 return the Directory attribute for the volume label
See also
Note
Text based on Ralf Brown Interrupt List Release 61
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |