My date is set on 1995 so that I would use a shareware program that has
expired..
OK, I wrote down the code like this, but it doesn't work. Where's the
problem?
procedure TForm1.DelDir(Dirname: string);
var
F: TSearchRec;
ftd: Integer;
begin
ftd := FindFirst(Dirname,faAnyFile,F);
while not ftd = 0 do begin // while there is a file do the following
if F.Attr = (faAnyFile - faDirectory) then begin // if file's not a
directory
if F.Name = '.' then else
if F.Name = '..' then else
DeleteFile(F.Name); // then delete it
end;
if F.Attr = faDirectory then begin // if it's a directory
GetDir(0,F.Name); // then change to it
DelDir(Dirname+'\'+F.Name); // use my DelDir on that dir
end;
ftd := FindNext(F); // FindNext
end;
FindClose(F); // the end
end;
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz