# How to programmatically comment out multiple source files?

How to programmatically comment out the entire content of multiple .m source files assuming they start with correct Mathematica syntax? I need it to be robust so the content of the file can be anything as long as it's valid .m source file.

-
Why would you want to comment out a whole source file? Isn't it a lot simpler to not load it? Also, comments are nestable, so have you tried just appending and prepending (* and *)? –  Szabolcs Mar 27 at 19:38
It's hard for all people who have access to those files to know what files they need to exclude from loading. It's easy for me to comment out the content of source files that I don't want anyone to load temporarily. Do you mean manually doing that for each file? –  Problemania Mar 27 at 20:07
you can just read the file in as a string, prepend and append the appropriate characters and save it back –  acl Mar 27 at 20:17