日期:2014-05-16 浏览次数:20797 次
Set fs = Wscript.CreateObject("Scripting.FileSystemobject")
If fs.FileExists("c:\myfile.exe") Then
Wscript.Echo "存在"
Else
Wscript.Echo "不存在"
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\FSO\ScriptLog.txt") Then
Set objFolder = objFSO.GetFile("C:\FSO\ScriptLog.txt")
Else
Wscript.Echo "File does not exist."
End If