Searches for the next file in a directory, returning information about the file in the given buffer.
mov ax, 714Fh ; Find Next File
mov bx, Handle ; see below
mov di, seg FindData ; see below
mov es, di
mov di, offset FindData
mov si, DateTimeFormat ; see below
int 21h
jc error
mov [ConversionCode], cx ; Unicode to OEM/ANSI conversion OK?
0 | Returns the date and time in 64-bit file time format. |
1 | Returns the MS-DOS date and time values. MS-DOS date and time values are returned in the low doubleword of the FILETIME structure. Within the doubleword, the date is returned in the high-order word; the time is in the low-order word. |
Clears the carry flag, copies information to the specified buffer, and sets the CX register to a combination of these values if successful:
0x0000 | All characters in the primary and alternate name member in the structure specified by FindData were successfully converted from Unicode. |
0x0001 | The primary name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode. |
0x0002 | The alternate name returned in the structure specified by FindData contains underscore characters in place of characters that could not be converted from Unicode. |
Otherwise, the function sets the carry flag and sets the AX register to an error value.
It is important to close the handle when it is no longer needed by calling Find Close (Interrupt 21h Function 71A1h).