检测特定目录下的某一个文件,
如果存在,则PASS
不存在则从另一个目录COPY这个文件

解决方案 »

  1.   

    先用if FildExists() = false then
          CopyFile(newFile,oldFile,Boolean);
      

  2.   

    直接用CopyFile
    CopyFile(SourceFile,DestFile,True);  //注意最后一个参数FailExists ,表明存在时是否不进行复制
      

  3.   

    还是不怎明白COPYFILE的用法
    CopyFile(SourceFile,DestFile,True);CopyFile('C:\99.JPG','D:\',True);好象没什么反应,
    嘻~
      

  4.   

    刚刚又试了一下
    CopyFile('C:\99.JPG','D:\99.JPG',True);这样好象就OK了。
    但是这样怎么也可以啊?CopyFile('C:\99.JPG','D:\99.JPG',false);
      

  5.   

    If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds.
      

  6.   

    CopyFile('C:\99.JPG','D:\99.JPG',false);
    意思就是,如果D:\99.JPG存在,就不复制,不存在就Copy过去啦
    所以怎么样你D盘都会有99.JPG的啦