VC++ CopyFile函数用法

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);  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值