That looks fine and works for me. (eg. renames foo.bar --> foo.bar.txt)
Do you have spaces in your filenames? If so, easiest way is to
use program named "rename", eg. command
rename 's/$/.txt/' *
does the same as your command above.
The syntax of the command is "rename regexp files", where regexp is a sedlike regular expression, in this case it 's/$/.txt/' where "s" is for search and replace, $ matches end of the string and ".txt" replaces it (end of the string/filename) with .txt (eg. adds .txt extension).