CopyFileTo函数怎样使用?
需不需要用USES命令
是不是API函数

解决方案 »

  1.   

    写得很清楚了:
    function CopyFileTo(const Source: string; const Destination: string): Boolean;Parametersconst Source: stringSource file name.
    const Destination: stringDestination file name.
    ReturnsBoolean - True if the file is copied, False on error.
    DescriptionCopyFileTo is a function used to copy the file specified in Source to the file specified in Destination.
    CopyFileTo will return False if the file in Destination already exists.
    CopyFileTo encapsulates the platform-specific calls needed to perform the file copy operation. On the Windows platform, this is the Win32 API function CopyFile. On the Linux platform, CopyFileTo uses a TFileStream instance to create the destination file.
      

  2.   

    copyfile('c:\windows\system.ini','d:\system.ini',false);
      

  3.   

    哦,看错了,是copyfileto啊
    那就是
    CopyFileTo(const Source: string; const Destination: string): Boolean;
      

  4.   

    !!!To lovedata:改名了!!
      

  5.   

    可是如果单纯用COPYFILETO(源文件,目标文件)好象不行.运行时的错误提示好象是"函数未定义"
      

  6.   

    Uses IdGlobal;
    copyfileto(源文件,目标文件),
    如是目标文件已存在则返回False,
      

  7.   

    运行时的错误提示好象是"函数未定义"的解决办法:uses IdGlobal;