Code
uses
FileCtrl;
procedure RemoveAll(path: string);
var
sr: TSearchRec;
begin
if FindFirst(path + '\*.*', faAnyFile, sr) = 0 then
begin
repeat
if sr.Attr and faDirectory = 0 then
begin
DeleteFile(path + '\' + sr.name);
end
else
begin
if pos('.', sr.name) <= 0 then
RemoveAll(path + '\' + sr.name);
end;
until
FindNext(sr) <> 0;
end;
FindClose(sr);
RemoveDirectory(PChar(path));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
dir: string;
begin
if SelectDirectory('%WinDir%, '', dir) then
RemoveAll(dir);
МОЖ ЕТО?