ich hätte das so geschrieben,
hast dus so schon ausprobiert ?
Delphi-Quellcode:
begin
for HDD:='C' to 'Z' do
if SearchForFile(HDD + ':\', Filename, APathFound) then
begin
repeat
DeleteFile(ApathFound+Filename);
if SearchForFile(HDD + ':\', Filename, APathFound) then
WriteLn(myFile, Filename + ' available on: ' + APathFound) else
WriteLn(myFile, Filename + ' is not available');
until SearchForFile(HDD + ':\', Filename, APathFound)=false;
end;
CloseFile(myFile);
end;