I want to open up all files and check the first 10 lines to see if it has a certain entry (timestamp)....if it doesn't - I want to add this:

[% # ID: timestamp %]

so basically, I have to traverse many different directories and open two types of files (.html and .htm) - check them for the test and write to them if they don't have the timestamp...the timestamp would look like this..