본문 바로가기
Application/Delphi Lecture

폴더 복사후 붙여넣기..

by 현이빈이 2008. 7. 24.
반응형
uses ShellApi;

function Copy_File(const Src, Dest: String): Boolean;
var
 FData : TSHFileOpStruct;
 FFrom, FTo: String;
begin

  FFrom := FileOperatorValue(Src);
  FTo   := FileOperatorValue(Dest);

  FData.fFlags := FOF_ALLOWUNDO OR FOF_NOCONFIRMMKDIR;
  FData.lpszProgressTitle := PChar( 'File Operation' );
  FData.pFrom := PChar( FFrom );
  FData.pTo := PChar( FTo );
  FData.Wnd := 0;
  FData.wFunc := FO_COPY;

  Result := ShFileOperation( FData ) = 0;
end;
반응형