trimming the end of a file

If you need help on how to use the program
Post Reply
wolfkin
Posts: 2
Joined: 2014-06-18 16:03:52
Location: Toronto, On

trimming the end of a file

Post by wolfkin »

I would like to trim the end of a file name.

So for instance:

20160526[Raw].jpg
20160527[Raw].jpg
20160528[Scan].jpg
20160529[Scan].jpg
20160530[Complete].jpg
20160531[Complete].jpg

This is what I have so far

Code: Select all

Find: \[\w+].(jpg|png|gif|bmp)$
Replace: .$1
but I'm not sure how to make it work for folders like

EastofEden[Scan]
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

There is maybe a cleaner way to do it, but this seems to work:

Code: Select all

^(.+)\[\w+](\.(jpg|png|gif|bmp))?$

Code: Select all

$1$2
Post Reply