Make a rename preset work on folders

I have a menu full of rename presets that I use almost every day.
Today, however, I noticed that many of them don't work on folders, like this one:

@NoDeselect
Rename TYPE=files REGEXP PATTERN ".(.+)(..*)#{dlgstring|Enter Number of Characters to Remove}" TO "\1\2" AUTORENAME

How can I fix them so they work on folders as well as files?

You have TYPE=files there so it's not surprising the command isn't doing anything on folders.

Additionally, your regexp is looking for a file extension in the (..*) part, which most folders will not have.