孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

function GetFileCount(ThePath,Ext:string):integer;

var

num:integer;

sr:TSearchRec;

begin

num :=0;

if ThePath[length(ThePath)]<>'\' then

ThePath :=ThePath+'\';

if (FindFirst(ThePath+Ext,faAnyFile,sr)=0 then

begin

num :=num+1;

while (FindNext(sr)=0) do

num :=num+1;

end;

result :=num;

end;

end;

posted on 2008-09-10 18:47  孤独的猫  阅读(200)  评论(0编辑  收藏  举报