如何创建每天上午12点的新日志文件与当前日期VBScript

时间:2017-07-25 20:03:40

标签: vbscript

strFileName1 = "D:\log.txt"
strContent = "" & Now & Space(2) & dir & vbCr & vbLf

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objLogs = objFS.OpenTextFile(strFileName1, ForAppending, True)

objLogs.WriteLine(strContent)
objLogs.Close

0 个答案:

没有答案