(Bulk) rename files by changing only their extensions

I have files that are shared into DT with the extension MARKDOWN. I want to change the extension to md as the files are imported. I think I can eventually puzzle this out through an AppleScript action on the Inbox to the database. Before I roll my own method, is there a direct (one step via REGEX) or pre-built method that can be attached as an action or run as a batch converter?

FWIW, the files are shared out directly to DT from the annotation app Highlights.

EDIT: It seems a bit more complicated than this. The imported document is a TEXTBUNDLE with the internal file as text.markdown. I’ll leave the question none-the-less as a general one even though I may have to take a different path.


.markdown is what appears to be used in the .textbundle format, so I’m not sure why you’d be wanting to make this change.

I initially thought that edit access was locked out of the markdown file itself because the file was “mis-named”. I see the real reason after reading about the current limitations in DT with .textbundle files.