Solo para agregar un poco de código al "repositorio" del foro, recién desarrollé esto:
Código Delphi
[-]
procedure DeleteDir(APath: string);
var
sr: TSearchRec;
begin
APath := IncludeTrailingBackslash(APath);
if FindFirst(APath + '*.*', faAnyFile, sr) = 0 Then
repeat
if (sr.Name <> '..') and (sr.Name <> '.') then
begin
if (sr.Attr = faDirectory) then
DeleteDir(APath + sr.Name)
else
Win32Check(SysUtils.DeleteFile(APath + sr.Name));
end;
until FindNext(sr) <> 0;
SysUtils.FindClose(sr);
APath := ExcludeTrailingBackslash(APath);
Win32Check(RemoveDir(APath));
end;
Saludos!