Set fso = CreateObject("Scripting.FileSystemObject")
filepath= "C:/JX/WorkSpace/ t.xls"
If (fso.FileExists(filepath) )Then
msgbox filepath & "exists"
Else
msgbox filepath & "doesn't exist"
End If
本文介绍了一个使用VBS脚本检查指定路径下文件是否存在并给出提示的方法。通过创建Scripting.FileSystemObject对象来操作文件系统,实现了对文件路径的检查。
Set fso = CreateObject("Scripting.FileSystemObject")
filepath= "C:/JX/WorkSpace/ t.xls"
If (fso.FileExists(filepath) )Then
msgbox filepath & "exists"
Else
msgbox filepath & "doesn't exist"
End If

被折叠的 条评论
为什么被折叠?