Ein weiteres Problem besteht dadrin das ich den Exit nich hinkriege wenn eine File nicht vorhanden ist.
Delphi-Quellcode:
Procedure DeletingFiles(Filename:String);
begin
for HDD:='C' to 'Z' do
if SearchForFile(HDD + ':\', Filename, APathFound) then
begin
repeat
DeleteFile(ApathFound+Filename);
WriteLn(myFile, ':: '+ Filename + ' available on: ' + APathFound)
until not SearchForFile(HDD + ':\', Filename, APathFound);
end
else
WriteLn(myFile, Filename + ' is not available on ', HDD);
end;
Also sowas wie
else
WriteLn(myFile, Filename + ' is not available on ', HDD) + Exit;