技术开发 频道

用Lotus Script修改物理文件

    【IT168 技术文章】

    Q:

    用lotus  script查找C盘是否存在abc.doc的文件,如果存在则把它删除,从另外地方拷贝一个同名文件过来。

    A:

    Dim  pathName  As  String,  fileName  As  String

    pathName$  =  "c:\*.*"

    fileName$  =  Dir$(pathName$,  0)

    Do  While  fileName$  <>  ""

    Print  fileName$

    fileName$  =  Dir$()

    if  fileName$="abc.doc"

    kill  "C:\"+fileName$

    end  if

    source1  =  "C:\"+fileName$

    destination  =  "D:\"+fileName$

    Filecopy  destination  ,source1

    Loop

    备注:

    其实Lotus 自带的帮助非常详细,平时多看看,会有很多的收获。
 

0
相关文章