码迷,mamicode.com
首页 > 编程语言 > 详细

C++ CopyFile

时间:2014-08-01 22:44:22      阅读:284      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   color   os   strong   io   文件   

 

复制文件

 

关键点

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!");

 

 

   


 

备注

 

 

相关链接

                           

 

 




C++ CopyFile,布布扣,bubuko.com

C++ CopyFile

标签:des   style   http   color   os   strong   io   文件   

原文地址:http://www.cnblogs.com/xe2011/p/3885736.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!