Advertisement
VoronVU

Untitled

Nov 6th, 2014
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.57 KB | None | 0 0
  1. procedure TFilesList.fGetFilesList(flPath : string; m1 : TMemo);
  2. var
  3.   Sr : TSearchRec;
  4.   Attr : Integer;
  5.   flCount : Integer;
  6.   arCount : Integer;
  7. begin
  8.   try
  9.     if FindFirst(flPath + '*', Attr, Sr) = 0 then
  10.       repeat
  11.         flCount := flCount + 1;
  12.         arCount := flCount - 1;
  13.  
  14.         SetLength(flList,flCount);
  15.         flList[arCount] := TflFile.Create;
  16.         flList[arCount].flName := Sr.Name;
  17.  
  18.         m1.Lines.Add(flList[arCount].flName);
  19.         flFileCount := flCount;
  20.       until FindNext(Sr) <> 0;
  21.   finally
  22.     FindClose(Sr);
  23.   end;
  24.  
  25. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement