首页 > 代码库 > C++ CopyFile
C++ CopyFile
复制文件
关键点
CopyFile
The CopyFile function copies an existing file to a new file.
The CopyFileEx function provides two additional capabilities. CopyFileEx can call a specified callback function each time a portion of the copy operation is completed, and CopyFileEx can be canceled during the copy operation.
BOOL CopyFile(
LPCTSTR lpExistingFileName,// name of an existing file
LPCTSTR lpNewFileName, // name of new file
BOOL bFailIfExists // operation if file exists
);
实现过程
if (::CopyFile("C:\\1.txt","D:\\2.txt",TRUE)) MessageBox("Copy OK!"); else MessageBox("Copy Faild!"); |
图
备注
相关链接
来自为知笔记(Wiz)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。