Searches for the first file or directory that matches a given pattern. MatchFirst() initializes the AnchorPath structure for you but you must initilize the following fields: ap_Flags, ap_Strlen, ap_BreakBits and ap_FoundBreak. The first call to MatchFirst() also passes you the first matching file which you can examine in ap_Info and the directory the files is in in ap_Current->an_Lock. After the first call to MatchFirst() call MatchNext(). The search begins whereever the current directory is set to. See CurrentDir(); For more info on patterns see ParsePattern().