I have several photos compiled in directories. However, these photos were processed by some old application and don't have file name extensions.
I would just assume that they are all JPG files so I want to rename all files to have the .jpg
extension.
Will use the find
and exec
combination.
First, let's test it with a safer echo command. The command simply echos for original filename and the desired filename.
find ./ -type f -name "*" -exec echo "{}" "{}.jpg" \;
Once confirmed that it is working, let's rename them all.
find ./ -type f -name "*" -exec mv "{}" "{}.jpg" \;