Linux has a handy rename command which is great for easily renaming file extensions within a directory.

> rename .htm .html *.htm

MacOS however has no such command.

Fortunately, Ben Han documented a nice work around by creating a simple script.
(Click here for a reminder on how to create MacOS scripts)

for f in *.$1
  mv $f ${f%$1}$2

It uses the mv command and loops through your directory doing the move based on whatever parameters you pass in.

For example to change all my pngs to jpgs all I have to do now is navigate to the target directory and type:

> png jpg

And voila! All my pngs are now jpgs.

Thanks again Ben for this great tip.