Remove a trailing string

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

Remove a trailing string

Postby JamesBryant » Thu Jul 13, 2017 11:02 am

I have a number of ebook files of various types (created by Calibre) with names containing a trailing two character string: space - (i.e. HEX 20 2D).

I wish to remove this string where it occurs, but not to alter files which do not have it.

I'm a bit concerned that if I try to use a regular expression the - character may be seen as an operator rather than a character.

I'm sure I could work out how to fix it with time and experiment but the efficient solution would appear to be to offer a free beer* to the first person to tell me how this is done. Please.

James

* Winner must collect - I live in the New Forest. At present I have Guinness, Cobra, Boddingtons, Czech Budvar Dark, Leffe Dark and Andechser Doppelbock Dunkel.
JamesBryant
 
Posts: 3
Joined: Thu Jul 13, 2017 10:42 am

Re: Remove a trailing string

Postby Emerkamp » Thu Jul 13, 2017 11:26 am

Hi,

Regex is your best bet, if you can show us 3-4 examples before and after renaming we should be able to get you a strict enough pattern match.

If I understand you need something like:

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


This should only match files like:
File Name -.exe
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Remove a trailing string

Postby JamesBryant » Thu Jul 13, 2017 12:48 pm

That worked - thank you very much.
It stopped each time there was a conflict - is there a way to tell it to continue, but not make any conversion causing a conflict?

I owe you a beer - is there a private email facility on this forum or shall I just give my email so you can tell me when to expect
you and I can tell you my address?
JamesBryant
 
Posts: 3
Joined: Thu Jul 13, 2017 10:42 am

Re: Remove a trailing string

Postby Emerkamp » Thu Jul 13, 2017 3:31 pm

Hello,

I believe under---> Options>> Display, <---you can disable the confirmation dialogs from appearing. During conflicts you can choose to have bru either
Overwrite or Prevent by selecting/Ticking either under Options. Prevent will auto add an _1 after each dup it comes across.

I owe you a beer - is there a private email facility on this forum or shall I just give my email so you can tell me when to expect
you and I can tell you my address?

Oh, Thank you for the offer. sounds pretty tempting but I'm clear across the world. If you wouldn't mind, just passing the help on down the line
would be more than I can ask of you. I'm just passing on info I was given.

Cheers from USA, Sir
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Remove a trailing string - and dealing with duplicates

Postby JamesBryant » Thu Jul 13, 2017 9:33 pm

Thanks for the advice on coping with duplicates too.

I shall surely pay on - here when I've become more skilled, elsewhere where I already have skills.

But if you ever do find yourself in the New Forest on the South Coast of England you'll be welcome to stop by and claim your beer anyway.
JamesBryant
 
Posts: 3
Joined: Thu Jul 13, 2017 10:42 am


Return to BRU Support