Registriert seit: 30. Nov 2005
Ort: München
5.771 Beiträge
Delphi 10.4 Sydney
|
Re: Schleife
1. Mär 2007, 13:08
Delphi-Quellcode:
function DeletingFiles(Filename:String):Boolean;
begin
result:=true;
for HDD:='C' to 'Z' do
if SearchForFile(HDD + ':\', Filename, APathFound) then
begin
repeat
DeleteFile(ApathFound+Filename);
WriteLn(myFile, ':: '+ Filename + ' available on: ' + APathFound);
result:=true;
until not SearchForFile(HDD + ':\', Filename, APathFound);
end
else
begin
WriteLn(myFile, Filename + ' is not available on ', HDD);
result:=false;
end;
end;
vielleicht geht es so?
Gruesse
KLaus
Klaus
|
|
Zitat
|