R-Name is a free batch-file-renaming utility. You simply drag-and-drop files (or folders) onto R-Name and they are automatically renamed based on your settings. You can even preview the changes before actually renaming the files!
R-Name can rename files in various ways.
Find and Replace characters (with regular expression)
Add, remove or replace file extensions like .jpg or .html
Add characters at the beginning or end of the filename, or even before a file extension
Sequential numbering
Homepage has source code. This version is for OS X 10.2.