procedure FindFileList(Path: string; var AList: TStringList);
var
SR: TSearchRec;
Dir: string;
begin
Dir := ExtractFilePath(Path);
if FindFirst(Path, faAnyFile, SR) = 0 then
repeat
if SR.Name[1] <> '.' then AList.Add(Dir + SR.Name);
until FindNext(SR) <> 0;
if FindFirst(Dir + '*.*', faDirectory, SR) = 0 then
repeat
if ((SR.Attr and faDirectory) = faDirectory) and (SR.Name[1] <> '.') then
FindFileList(Dir + SR.Name + '\' + ExtractFileName(Path), AList);
until FindNext(SR) <> 0;
FindClose(SR);
end;
|