also
To test for an attribute, combine the value of the Attr field with the attribute constant with the and operator. If the file has that attribute, the result will be greater than 0. For example, if the found file is a hidden file, the following expression will evaluate to True: (SearchRec.Attr and faHidden) <> 0.
Demnach nach faanyfile suchen, für Ordner
(SearchRec.Attr and fadirectory) <> 0 nehmen
und für dateien:
FindFirst('*.*', 0, SearchRec)
oder wie