Renaming files according to a regex pattern

Requires an M1 Mac, though

I would like to rename files on entry to DVT by replacing - and _ with spaces. I really hate unnecessary hyphens and underscores in names.
I’d like this to happen immediately on import to the Inbox. I thought of having Hazel act on the Inbox but files may not stay there long enough.
I know nothing of RegEx.
Is this possible?

A smart rule triggered on import and executing a simple script should be able to handle this. See e.g. code of Scripts > Rename > Replace Text…

1 Like