Verdammt, ich habe vergessen den Source zu posten:
Delphi-Quellcode:
procedure EraseFile(Filename: string);
const
Buffer = 1024;
FillBuffer: array[0..5] of Integer = ($00, $FF, $00, $F0, $0F, $00);
var
arr: array[1..Buffer] of byte;
f: file;
i, j, n: integer;
begin
AssignFile(f, FileName);
Reset(f, 1);
n := FileSize(f);
for j := 0 to 5 do
begin
for i := 1 to n div Buffer do
begin
BlockWrite(f, FillBuffer[j], Buffer);
end;
end;
CloseFile(f);
RenameFile(Filename, ExtractFilepath(Filename)+'$000000.tmp');
DeleteFile(ExtractFilepath(Filename)+'$000000.tmp');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
EraseFile('G:\wefigl\1222.jpg');
end;
@HW764: Kuck doch mal, was du da machst:
Delphi-Quellcode:
var
i: Integer;
begin
i := 1;
i := 2;
i := 3;
ShowMessage(IntToStr(i));