vb6如何判断某个文件是否在某个文件夹下?
strRet = Dir$(PathFileName, vbNormal)
If Len(strRet) <> 0 Then
MsgBox "存在"
Else
MsgBox "不存在"
End If
Dir() 检查文件是否存在,不存在返回空串;存在返回文件信息
可根据第二个参数调整。
strRet = Dir$(PathFileName, vbNormal)
If Len(strRet) <> 0 Then
MsgBox "存在"
Else
MsgBox "不存在"
End If
Dir() 检查文件是否存在,不存在返回空串;存在返回文件信息
可根据第二个参数调整。