Hi, thanks for your reply - brilliant.
Only one problem, how do you approach this task in a non-functional way, i.e just so it can be implemented into my code above. All I am really stuck on is getting the else portion of the script to scan all files in a directory for a string, report the line number followed by a new line with the sentence the search term appears on in bold and uppercase. I can do all thr formatting (bold, uppercase), it is just the process of looping through the files and reporting the line number with the line containing the search string.
Thanks again.