i:= FindFirst(pchar(adir + '*.*'),faAnyFile,sr);
while i=0 do
begin
if (SearchRec.Attr and faDirectory = faDirectory) then
begin
//处理目录的情况
if (SearchRec.Name <> '.') then //如果当前文件不是本级目录
begin
i:=FindNext(SearchRec);
continue;
end;
listbox1.Items.Add(SearchRec.Name);
i:=FindNext(SearchRec);
end;