Besten Dank für die Info!
Zitat von
DeddyH:
IMO sollte die Abfrage auf '.' und '..' schon mit rein, aber an die richtige Stelle
Delphi-Quellcode:
procedure findfiles(Source: string);
var SearchRec: TSearchRec;
begin
screen.cursor:=crhourglass;
if Source <> '' then
begin
if FindFirst(Source + '\*.*',faanyfile, SearchRec)=0 then
begin
repeat
application.ProcessMessages;
if ( ( SearchRec.Attr and faDirectory ) = faDirectory ) then
begin
if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then
findfiles(Source + '\' + SearchRec.Name);
end else
begin
CopyFilewithprogressbar(PChar(Source+'\'+SearchRec.Name), PChar(networkpfad+ '\' + SearchRec.Name));
end;
application.ProcessMessages;
until (FindNext(SearchRec) <> 0);
FindClose(SearchRec);
end;
end;
screen.cursor:=crdefault;
end;