Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find if a file exsist

Status
Not open for further replies.

kkson

MIS
Dec 28, 2003
67
US
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.

thanks
 
Here's a cool little function"
Code:
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

Ray D'Andrade
 
Thanks, dir worked. Will try the function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top