Script to cut a Filename after a specified character

Hi!

I have to cut a lot of filenames after the last “-”. Is there any solution available to do this?

Example:

Document - xyz - 12. Oktober 2017.pdf

to

Document - xyz.pdf

Cutting after the first “-” is easy, but the last?

Any new script would do exactly what the existing Rename Using Regex script (available from the Support Assistant’s Extras) already does. There a numerous Regex resources on the net to help you build the search and replace rules. It’s not complicated

Or you could go to MacScripter.net, and find out about text item delimiters.
That would save you from using a shell command in your script, which is always slow.