Ich habe diese function verwendet:
Delphi-Quellcode:
function DoFileWork(aOperation: FILEOP_FLAGS; aFrom, aTo: AnsiString;
Flags: FILEOP_FLAGS): Integer;
var
FromPath, ToPath: AnsiString;
SHFileOpStruct: TSHFileOpStruct;
begin
FromPath := aFrom + #0#0;
ToPath := aTo + #0#0;
with SHFileOpStruct do
begin
Wnd := 0;
wFunc := aOperation;
pFrom := PAnsiChar(FromPath);
if ToPath <> '' then
begin
pTo := PAnsiChar(ToPath)
end else begin // target available
pTo := nil;
end; // target not available
fFlags := Flags;
end; // structure
Result := SHFileOperationA(SHFileOpStruct);
end;
Danke im Vorraus