请问如何判断文件是否存在
刘玉蓉
发布于2014-09-01 17:55
4
0
标签:
脚本如下,文件明明就存在,可为什么判断为不存在?
Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")
Dim Month,Day,Hour,Minute
Dim path,path1
Month=HMIRuntime.Tags("month").read
Day=HMIRuntime.Tags("day").read
Hour=HMIRuntime.Tags("hour").read
Minute=HMIRuntime.Tags("minute").read
path="E: empee"&Month&Day&hour&Minute
path1=path&".xls"
If FS.FolderExists(path1) = True Then
MsgBox "11"
Else
MsgBox "22"
End If
佳答案
这句错了
If FS.FolderExists(path1) = True Then