Page 1 of 1

How to rename these files?

Posted: 18 Feb 2022 13:03
by zBernie
I've tried using RegEx and batch renaming but am not getting the desired results. How can I rename files like this example:

File One (Remove parenthesis and text here).txt
File Two (Remove parenthesis and text here).txt
File Three (Remove parenthesis and text here).txt

to

File One.txt
File Two.txt
File Three.txt


-Thanks

Re: How to rename these files?

Posted: 18 Feb 2022 13:20
by highend
^(.*?)([ ]+\(.+?\))(\.[^.]+)$ > $1$3

Re: How to rename these files?

Posted: 18 Feb 2022 13:31
by zBernie
highend wrote: ↑18 Feb 2022 13:20
^(.*?)([ ]+\(.+?\))(\.[^.]+)$ > $1$3
Thank you, but I screwed up the examples. They have another set of parenthesis in them like:

File Name One (1998) - AAAAA - The Good Son (Get rid of this).txt
File Name Two (1998) - BBBBB - Blah Blah Blah (Get rid of this).txt

TO

File Name One (2000) - AAAAA - The Good Son.txt
File Name Two (1998) - BBBBB - Blah Blah Blah.txt

Re: How to rename these files?

Posted: 18 Feb 2022 13:37
by highend
And you can't do that single change to the pattern itself?

^(.*?)([ ]+\([^(]+?\))(\.[^.]+)$ > $1$3

Re: How to rename these files?

Posted: 18 Feb 2022 13:50
by zBernie
highend wrote: ↑18 Feb 2022 13:37 And you can't do that single change to the pattern itself?

^(.*?)([ ]+\([^(]+?\))(\.[^.]+)$ > $1$3
Thanks.