Delphi(程序人生)

Delphi Programer DoubleCat

导航

复制文件夹

uses shellAPI;

    procedure TForm1.Button1Click(Sender: TObject);

    var

       lpFileOp: TSHFileOpStruct;

    begin

      with lpFileOp do

      begin

        Wnd:=Self.Handle;

        wfunc:=FO_COPY;

        pFrom:=pchar('C:\AAA');

        pTo:=pchar('D:\AAA');

        fFlags:=FOF_ALLOWUNDO;

        hNameMappings:=nil;

        lpszProgressTitle:=nil;

        fAnyOperationsAborted:=True;

     end;

     if SHFileOperation(lpFileOp)<>0 then

     ShowMessage('删除失败');

    end;

posted on 2008-06-14 17:10  DoubleCat  阅读(614)  评论(0编辑  收藏  举报