The first parameter is the location to search in. The second parameter is the search pattern. You were telling the computer to look in "SpamWords" which should be a sub-folder within the folder that your application is running and return any file with the txt extension. It probably threw an error saying that SpamWords is not a valid directory. You didn't actually tell us what the error was though...just that the program quit on that line.
You said
/-/ AL 3 wrote:
SpamWords is the name of the file.
Did you mean SpamWords is the name of the folder? First just try Directory.Exists("SpamWords") If that returns false, then the SpamWords folder is not where you think it is. That would be the only reason that I could see it having a problem