Page 1 of 1

Same start, different from there until .extension

Posted: 26 Aug 2020 15:21
by AugerJ
Hello. There's a bunch of files with sequences like these in their names:
_2020 08 11_13 28 45_1_113
_2020 08 04_23 01 46_1_678
etc.
Same syntax and first four digits (2020), the rest can vary.
It looks like this:
Name_2020 08 04_23 01 46_1_678.extension

I want it to look like this:
Name.extension

What pattern should I use in (presumably) Rename Special: Search And Replace ?

Thanks.

Re: Same start, different from there until .extension

Posted: 26 Aug 2020 15:41
by highend
In search and replace? Better none^^
regexp rename: ^(.+?)(_\d{4}.+\.)(.+) > $1.$3

Re: Same start, different from there until .extension

Posted: 26 Aug 2020 19:37
by AugerJ
Thanks!
And if I decide to keep "_2020":
Name_2020.extension
how will the pattern look?

Re: Same start, different from there until .extension

Posted: 26 Aug 2020 19:41
by highend
Then the first capturing groups ends after the } and not after the ? and obviously the second begins right after it...

Re: Same start, different from there until .extension

Posted: 26 Aug 2020 21:03
by AugerJ
Thanks. Turns out, some names were more complex. So, the 1st way + some files individually... )