zoukankan      html  css  js  c++  java
  • Delphi 移动目录

     
     
    ----   3、移动目录  

    ----   有了拷贝目录和删除目录的函数,移动目录就变得很简单,只需顺序调用前两个函数即可:  

    function   MoveDir(sDirName:String;
    sToDirName:string):Boolean;
    begin
              if   CopyDir(sDirName,sToDirName)   then
                    if   RemoveDir(sDirName)   then
                          result:=True
                    else
                          result:=false;
    end;

    ///////////////////////////////////////////////
    procedure   TForm1.Button2Click(Sender:   TObject);
    var
        OpStruc:   TSHFileOpStruct;
        frombuf,   tobuf:   Array   [0..128]   of   Char;
    Begin
        FillChar(   frombuf,   Sizeof(frombuf),   0   );
        FillChar(   tobuf,   Sizeof(tobuf),   0   );
        StrPCopy(   frombuf,   'd:\brief\*.* '   );
        StrPCopy(   tobuf,   'd:\temp\brief '   );
        With   OpStruc   DO   Begin
            Wnd:=   Handle;
            wFunc:=   FO_COPY;
            pFrom:=   @frombuf;
            pTo:=@tobuf;
            fFlags:=   FOF_NOCONFIRMATION   or   FOF_RENAMEONCOLLISION;
            fAnyOperationsAborted:=   False;
            hNameMappings:=   Nil;
            lpszProgressTitle:=   Nil;

        end;
        ShFileOperation(   OpStruc   );
    end;
  • 相关阅读:
    linux嵌入式终端ssh无法输入中文以及删除中文异常
    DNS解析错误导致无法ping通网络
    嵌入式linux 打开ping端口
    嵌入式Linux vim编辑器支持中文
    常见BUG-Web
    考勤项目
    功能测试报告的编写
    04_postman环境变量和身份验证
    03_postman的collection管理
    02_postman断言
  • 原文地址:https://www.cnblogs.com/zhangzhifeng/p/2276750.html
Copyright © 2011-2022 走看看