I don't know how to use the .IndexOF() function.

I'm not sure if you understood the question;
If there were these files in the root of drive c:/
test1.txt
test is my name.txt
test234.txt
my test1.txt
this is test34.txt

Then if I searched for the word "test" then I would want all these to come up. I don't want to search inside a file, I want to search in a directory.