创建文本文件 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("C:\FSO\ScriptLog.txt") 检察文件是否存在 Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists("C:\FSO\ScriptLog.txt") Then Set objFolder = objFSO.GetFile("C:\FSO\ScriptLog.txt")