procedure findfilename(direc:string);
var SearchRec: TSearchRec;
list:tstringlist;
retval:integer;
begin
list:=tstringlist.create;
RetVal := FindFirst('c:/temp/*.*', faAnyFile, SearchRec);
try
while RetVal = 0 do
begin
if (searchrec.name<>'.') and (searchrec.name<>'..') then
list.add(searchrec.name);
RetVal := FindNext(SearchRec);
end;
finally
FindClose(SearchRec);
end;
end;