Synopsis:
sys_dirfirst(path,attributes)
Arguments:
path - The path to search for
attributes - The attributes of the file or directory to search for.
Description: This function starts a search for the first occurance of the file or directory that matches the path and attributes specified. Wildcard characters (* and ?) can be used in the path.
The attributes argument can include one or more of the following characters indicating the attribute(s) of the files to be found:
n Normal file
r Read-only file
h Hidden file
s System file
v Volume label
d Sub-directory
a Archive bit set
If successful, dir_first returns the file name (only the name.ext part, without any preceding directory path or drive). If the path or file given was not found the return value is "?".
Return Value:
Returns "?" or the file name found or a negative error code.