'向指定的文件写字符串,第三个参数指定是否删除原来的内容
Function Z_WriteLog(sFileName, sText)
    Dim fs, fso, sLog
    sLog = Now() & ": " & sText

    set fs = CreateObject("Scripting.FileSystemObject")
    set fso = fs.OpenTextFile(sFileName, 8, True)  '第三个参数表明文件不存在,则新建文件
    fso.WriteLine sLog
    fso.Close
    set fso = Nothing
    set fs = Nothing
End Function

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-05-21
  • 2022-12-23
相关资源
相似解决方案