BOOL CopyFile(    LPCTSTR lpExistingFileName, // pointer to name of an existing file 
    LPCTSTR lpNewFileName, // pointer to filename to copy to 
    BOOL bFailIfExists  // flag for operation if file exists 
   );
 

解决方案 »

  1.   

    { ----------------------------------------------------- }
    {copy整个目录                                           }
    { ----------------------------------------------------- }
    function CopyDir(FromDir, ToDir: string): boolean;
    var T         : TSHFileOpStruct;
    begin
            With T do
            Begin
              Wnd:=Application.Handle;
              wFunc:=FO_COPY ;
              pFrom:=Pchar(FromDir);
              pTo:=pchar(ToDir);
              hNameMappings:=nil;
              lpszProgressTitle:=nil;
              fFlags:=FOF_NOCONFIRMATION;
            End;
            SHFileOperation(T);
            result := true;
    end;
      

  2.   

    COPYFILE肯定可以,另一种没试过,应该也没问题。