通过处理打开文件错误即可知道文件是否存在:
On Error Resume NextSet ofs=Wscript.CreateObject("Scripting.FilesystemObject")Set oFile=ofs.GetFile("C:\MyDb.ldb")If Err.Number = 0 ThenWscript.echo "File found"ElseWscript.echo "File not found"End If