I have lots of files that need an extension appended to them but they are in a directory with lots of subdirectories. Currently the files have no extension at all. How would I rename just the files but not rename any of the directories or subdirectories?
Iterate all and test whether it's a regular file or not.
In case you need to avoid adding extension on files that already have it: