Ver Mensaje Individual
  #4  
Antiguo 15-09-2004
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.932
Reputación: 27
delphi.com.ar Va por buen camino
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!
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita