VB Code:
Public Declare Function PathFileExists Lib "shlwapi.dll" _ Alias "PathFileExistsA" (ByVal pszPath As String) As Long Public Function FileExists(strFileName As String) As Boolean If PathFileExists(strFileName) = 1 Then FileExists = True Else FileExists = False End If End Function ' Usage If FileExists("c:\test.text") = False Then Msgbox "File Does not Exist" End If




Reply With Quote