Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(strPath, True)
a.write (strResult)
a.Close
将字符串strResult写入新建的strPath文件中,如已存在则直接覆盖。
本文介绍如何使用VBScript创建对象、创建文本文件,并将指定字符串写入该文件,若文件已存在,则直接进行覆盖操作。
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(strPath, True)
a.write (strResult)
a.Close
将字符串strResult写入新建的strPath文件中,如已存在则直接覆盖。
831
3516

被折叠的 条评论
为什么被折叠?
