Código
var
SR: TSearchRec;
I: integer;
begin
I := FindFirst('c:Delphi*.*', faAnyFile, SR);
while I = 0 do begin if (SR.Attr and faDirectory) <> faDirectory then
if not DeleteFile('c:Delphi' + SR.Name) then ShowMessage('Não foi possível excluir
c:Delphi' + SR.Name);
I := FindNext(SR);
end;end;
// Os arquivos excluídos com esta rotina não vão para a lixeira!
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009