Paging unix nerds, need help with mass file extension change

I have about 400 .htm files that I need to change to .html. There is absolutely no way that I am going to do this by hand. Does anyone know of any unix commands that would allow me to do this. I assume it’s in the realm of regular expressions.

I tried my luck and went with:

mv *.htm *.html

That did not work!

Let me know what would be my best bet. Thanks!

–mark

ugh, I know there is a way but I’m not remembering it, hold on

edit:

after a quick google search and a quick test

ls -d .htm | sed 's/(.).htm$/mv “&” “\1.html”/’ | sh

simpler option:

for i in * ; do mv “$i” basename "$i" .htm.html ; done

for i in *.htm;
do mv $i ${i%%.htm}.html;
done

You sir, are the man!

Thank you much!

<EDIT> Problem solved I guess