Entschuldigung
ich hab die DelFile Funktion vergessen:
Delphi-Quellcode:
function DelFile(const AFile: string): boolean;
var
sh: SHFileOpStruct;
begin
ZeroMemory(@sh, sizeof(sh));
with sh do
begin
Wnd := Application.Handle;
wFunc := fo_Delete;
pFrom := PChar(AFile + #0);
fFlags := fof_Silent or fof_NoConfirmation;
end;
result := SHFileOperation(sh) = 0;
end;