write to multiple files depending on file type (solved)

I want a script that will add comments to a file before check-in files. comments depend on type of files.
i have a script to list files in the directory that will be checked-in
There are xml, js, html, vm files. vm will use comments like c/c++ ( // or /*..*/)
can you help me add a comment line at start of each file in the directory and sub directories depending on file type. comment like " Name: xxxx Date:xxxx comment: yyyyyyyy". Name and comments can be arguments and date is automatically picked.
The scripts should remove read only permission, check file type, write details to file and save it.
any help would be appreciated.
currently i have:

x=1
  svn status | cut -c8- |\
  while read LINE
  do
    filename[$x]=$LINE
    x=`expr $x + 1`
  done

so ${filename[x]} has file names that needs to be checked-in .. but not the directory in which they are.

---------- Post updated at 02:31 PM ---------- Previous update was at 12:32 PM ----------

Hey guys i was able to do this on my own... thanks..