I get access denied on this file, and i think it is because the server not have access to i. If I run the code on my intern computer it works fine.
Do any of you know away to to find a specific word in a file and to overcome this issue!
Obviously you have to make sure that the computer that you run this on has access to the file that you want to read. If it doesn't, then you can't solve that by changing the source code of your program.
The code you posted looks fine; it will return "#5FB404" if the word was found in the file, and "" (an empty string) if it was not found.