if not DirectoryExists(sour_path) then begin AStrings.Clear; exit; end;
TmpList:=TStringList.Create; TmpList.Clear;
if FindFirst(sour_path+sour_file,faAnyfile,FileRec) = 0 then repeat if ((FileRec.Attr and faDirectory) = 0) then begin TmpList.Add(sour_path+FileRec.Name) end; until FindNext(FileRec)<>0;
if not DirectoryExists(sour_path) then begin AStrings.Clear; exit; end;
TmpList:=TStringList.Create; TmpList.Clear;
if FindFirst(sour_path+'*.*',faAnyfile,FileRec) = 0 then repeat if ((FileRec.Attr and faDirectory) <> 0) then begin if ((FileRec.Name<> '.') and (FileRec.Name <> '..')) then _GetFileList(AStrings, sour_path+ FileRec.Name + '\', sour_file); end else if FindFirst(sour_path + FileName,faAnyfile,subFileRec) = 0 then repeat if ((subFileRec.Attr and faDirectory) = 0) then TmpList.Add(sour_path+subFileRec.Name); until FindNext(subFileRec)<>0;
until FindNext(FileRec)<>0;
FindClose(FileRec); for i := 0 to TmpList.Count -1 do AStrings.Add(TmpList.Strings[i]);