CopyFile函数,文件拷贝函数,结构如下:

copyfile(   

            lpcstr     lpexistingfilename,             //源文件路径   

            lpcstr     lpnewfilename,                   //新文件路径   

            bool       bfailifexists                       //为true的话,如果新文件已存在, 则返回false;

                                                                  为false的话,如果新文件已存在,会将原文件覆盖。

            );  

函数成功返回true,失败返回false;

举例:

CopyFile(pChar('5586523.png'),pChar(ExtractFilePath(Application.ExeName) + 'test.png'),true);

 

posted on 2014-07-23 09:20  GhostWhisper  阅读(2443)  评论(0编辑  收藏  举报