Want only to remove past the last "-" when multiple dashes

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Want only to remove past the last "-" when multiple dashes

Postby wclark99 » Wed Jun 20, 2018 7:34 pm

I have a file name like "BT3-6-0004-00002-1_SQCK" and I would like to rename it to remove the last -1_SQCK without removing any of the previous dashes. What formula would I need to make this work?
wclark99
 
Posts: 3
Joined: Thu Oct 12, 2017 3:17 pm

Re: Want only to remove past the last "-" when multiple dashes

Postby therube » Wed Jun 20, 2018 9:11 pm

1:RegEx
Code: Select all
Match:  (.*)-
Replace: \1

That will remove everything after the last dash (including the last dash itself) in a name.

5:Remove -> Trim (box, checkmark) will remove trailing <sp>

Without which you may end up with a file name like: "thick as a brick .mp3" (a <sp> between the k and the .).
therube
 
Posts: 1317
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support