using the following I add the file name to the front of each line and send the output to a single file.
ls | while read file; do sed -e \"s/^/$file/g\" $fil
this one works fine for me and it is simpler to use than Kent's answer
NOTE: than the full pathname is inserted for that one
find . -type f | xargs -r -t -i sed -r 's|^|'{}' |g' {}
use this one instead to keep only the bare filename part
find . -type f | xargs -r -t -i sed -r -e 's|^|'{}' |g' -e 's|^.+/||g' {}
then if your are happy with stdout results you might add -i switch to the sed command to overwrite the files
find . -type f | xargs -r -t -i sed -i -r -e 's|^|'{}' |g' -e 's|^.+/||g' {}