Find all files (not directories) in a temporary directory, and for each file, replace all lines with a "#" at the beginning (if it already has one, leave it as is).
find $(mktemp -u) -type f ! -name '.*' -exec sed -i '' "s/^\(#\)\{0,1\}.*/\1/g" {} \;