Posted By

HIMID on 05/28/10


Tagged


Versions (?)

333


 / Published in: Delphi
 

  1. //определение количества файлов в папке
  2. function GetFileCount(Dir: string): integer;
  3. var
  4. fs: TSearchRec;
  5. begin
  6. Result := 0;
  7. if FindFirst(Dir + '\*.jpg', faAnyFile - faDirectory - faVolumeID, fs) = 0
  8. then
  9. repeat
  10. inc(Result);
  11. until
  12. FindNext(fs) <> 0;
  13. FindClose(fs);
  14. end;

Report this snippet  

You need to login to post a comment.