I am trying to see if a file exsist before I import it into my db. If the file is not there and I run the transfertext command I get an error on the import. I would like to check for the file before importing.
Function FileExists(FilePath As String) As Boolean
Dim iLen As Integer
On Error Resume Next
iLen = Len(Dir(FilePath))
FileExists = (Not Err And iLen > 0)
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.