function DelFullDir(Const DirToDel : TFileName):boolean;
var
ppldk: TWin32FindData;
hfile:Thandle;
ss : string;
begin
result:=false;
try
hfile:=findfirstfile(Pchar(DirToDel+'*.*'),ppldk);
repeat
if (hfile <> INVALID_HANDLE_VALUE)
and ((strcomp(ppldk.cFileName,'.')<>0) and (strcomp(ppldk.cFileName,'..')<>0)) then
begin
ss:=DirToDel;
ss:=ss+ppldk.cFileName;
SetFileAttributes(pchar(ss),FILE_ATTRIBUTE_NORMAL);
deletefile(ss);
end;
until not findnextfile(hfile,ppldk);
if (hfile <> INVALID_HANDLE_VALUE) then
windows.findclose(hfile);
if RemoveDirectory(pchar(DirToDel)) then
result:=true;
except
result:=false;
end;
end;