var
sr: TSearchRec;
i:integer;
begin
i:=0;
if FindFirst(c:\aa\*.*,faAnyFile , sr) = 0 then
i:=i+1;
while FindNext(sr) = 0 do
i:=i+1;
FindClose(sr);
end;
sr: TSearchRec;
i:integer;
begin
i:=0;
if FindFirst(c:\aa\*.*,faAnyFile , sr) = 0 then
i:=i+1;
while FindNext(sr) = 0 do
i:=i+1;
FindClose(sr);
end;
i就是文件数