![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
||||
|
||||
|
Prueba con esta función:
Código:
procedure Tselecdir.borrarClick(Sender: TObject);
procedure borradentro(directorio:string);
var
n:integer;
Rbusqueda : TSearchRec;
begin
n := FindFirst(directorio+'\*.*',faanyfile, Rbusqueda);
while n=0 do begin
if (rbusqueda.Name <> '..') and
(rbusqueda.Name <> '.') then begin
if (rbusqueda.Attr = faDirectory) then begin
borradentro(directorio+'\'+rbusqueda.Name);
rmdir(directorio+'\'+rbusqueda.Name);
end else
deletefile(directorio+'\'+Rbusqueda.name) ;
end;
n := FindNext(Rbusqueda);
end;
end;
var
diractivo:string;
begin
//hago el de defecto el padre, sino.. error I/O16
chdir('..');
GetDir(0,diractivo);
borradentro(DirectLB.directory );
rmdir(DirectLB.directory);
DirectLB.directory := diractivo;
end;
__________________
Guía de Estilo de los Foros Cita:
|
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|