test for existance of file by extension

  • Thread starter Thread starter Guest
  • Start date Start date
BobbyS said:
How do I test for the existance of files with a .txt in a given folder?


Dir(strPath & "\*.txt") will take care of this. It returns
a zero length string if there is no file to find, or the
first file name if one is found (subsequent calls to Dir()
will return the next file name that matches).
 
Back
Top