Example:<br>uses <br> Windows, SysUtils, ShellAPI, FileCtrl; <br><br>procedure SHCopyFile(hWndOwner: HWND; const SourceFile, TargetFile: string); <br>var Info: TSHFileOpStruct; <br> Aborted : Bool; <br>begin <br> Aborted := False; <br> with Info do <br> begin <br> Wnd := hWndOwner; <br> wFunc := FO_COPY; <br>{ From Microsoft's Help: <br> wFunc = Operation to perform. This member can be one of the following values: <br> FO_COPY Copies the files specified by pFrom to the location specified by pTo. <br> FO_DELETE Deletes the files specified by pFrom (pTo is ignored). <br> FO_MOVE Moves the files specified by pFrom to the location specified by pTo. <br> FO_RENAME Renames the files specified by pFrom. } <br> pFrom := pChar(SourceFile); <br> pTo := pChar(TargetFile); <br> fFlags := 0; <br> fAnyOperationsAborted := Aborted; <br> end; <br> try <br> SHFileOperation(Info); <br> finally <br> if Aborted then; <br> end; <br>end;