delete contents between ( )

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

delete contents between ( )

Postby Pleuris » Wed Mar 18, 2020 3:05 pm

Hello,


i've got about 1200 files with filenames like this: "FIAF2 - Great Race Crashes (1280x720-AVC-2509Kbps-29.970fps, AAC-126Kbps-48.0KHz-2ch, 0h53m51.114s, 5q95g114).mp4" But I want them a lot shorter. Even as short as "Great Race Crashes.mp4". For the last 2 hours i've been struggling. Deleting the first few characters looked easy. But sometimes its FIAF2, sometimes FIAF2F3. So the 5 Remove 8 characters before - doesn't always work. But I can live with that. But the long info between brackets i can't seem to delete. If i put ( ) in RegEx and a . in the second line ALL text is replaced with a .

How can this software do this? Not a problem if i need to do it in two steps, but the long info between the round brackets makes the filenames too long for a FAT32 card.

Kind regards
Pleuris
 
Posts: 2
Joined: Wed Mar 18, 2020 2:49 pm

Re: delete contents between ( )

Postby therube » Wed Mar 18, 2020 4:35 pm

(As written) match anything up to the last set of (open & close) parens, keeping the matching part & deleting all else.

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


Code: Select all
MyVideo(tr)(MA).mp4                                      MyVideo(tr).mp4
FIAF2 - Great Race Crashes (1280x720-AVC-2509Kbps).mp4   FIAF2 - Great Race Crashes .mp4


For the FIAF2 entry, you might throw in there a, 5:Remove -> Trim, to eat the trailing space in the file name.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: delete contents between ( )

Postby Pleuris » Wed Mar 18, 2020 5:13 pm

Thanks, that does the trick.

I was getting close to it, but now seeing the solution i think i'm starting to understand it.

Many thanks.
Pleuris
 
Posts: 2
Joined: Wed Mar 18, 2020 2:49 pm


Return to BRU Support