IsFile




Public Function IsFileExist(ByVal strFileName As String) As Boolean
'Determines if a file exists

Dim fs As Object
If InStr(strFileName, "*") = 0 And InStr(strFileName, "?") = 0 Then
Set fs = CreateObject("Scripting.FileSystemObject")
IsFileExist = fs.FileExists(strFileName)
Set fs = Nothing
Else
IsFileExist = Not (Dir(strFileName) = "")
End If
End Function










( isfile.html )- by Paolo Puglisi - Modifica del 17/12/2023