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
);
当中各參数的意义:
LPCTSTR lpExistingFileName, // 你要拷贝的源文件名称
LPCTSTR lpNewFileName, // 你要拷贝的目标文件名称
BOOL bFailIfExists // 假设目标已经存在,不拷贝(True)并返回False,覆盖目标(false)

如:
//复制文件c:\log.txt到d:\log.txt,假设D:\log.txt已经存在,就覆盖
CopyFile("c:\\log.txt","d:\\log.txt",false);  

相关文章:

  • 2022-12-23
  • 2021-08-26
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2022-02-04
  • 2022-02-25
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
相关资源
相似解决方案