Hi

I am trying to write a function that works with files that only have a ".txt" extension.

code:

str1 = '(Whatever the filename is)
str2 = "*.txt"

intCompare1 = str1 Like str2
if intCompare1 = "-1" then
msgbox("Contains txt file")
else
msgbox("Does not contain txt file")
end if

Question: How do I include in the comparrison, variations of .txt? (eg. *.txt, *.TXT, *.Txt etc...)

Thanks

Gregg