QTP之创建text文件并写入内容

Dim fso,operfile

Const foreading = 1, forwriting = 2, forappending = 8

set fso = createobject("scripting.filesystemobject")

    if fso.fileexits("d:/ceshi.txt")  then

       fso.deletefile"d:/ceshi.txt"

    else

      end if

set openfile = fso.createtextfile("d:/ceshi.txt")

openfile.writeline("写入内容")

openfile.close

猜你喜欢

转载自crystal2012.iteye.com/blog/1442475
今日推荐