Page 1 of 1

Bulk Rename Strip characters

PostPosted: Wed Jan 11, 2017 9:03 am
by jmacp
Hi

I have many files to rename examples below

66011 Carluke 2 26-05-14
66013 New Barnetby 17-05-08
66020 66121 New Barnetby 30-04-14
66015 66119 66250 66143 Hartwood 05-05-12
66069 Hartwood 2 06-04-14

Some files have 1 or 2 extra characters and then a date.
What I would like to do is strip the numbers after the last text characters. I can then add date taken in from the options in the program.

66011 Carluke
66013 New Barnetby
66020 66121 New Barnetby
66015 66119 66250 66143 Hartwood
66069 Hartwood

Thanks John

Re: Bulk Rename Strip characters

PostPosted: Wed Jan 11, 2017 1:35 pm
by KenP
This should work.

RegEx (1)
Match: ^(.*)([a-z])
Replace: \1\2

Re: Bulk Rename Strip characters

PostPosted: Wed Jan 11, 2017 5:36 pm
by jmacp
That's great thanks another question if I may?

When the program encounters a duplicate file it adds 1, 2 etc

Technically it adds 1 to the second file it encounters. ie

duplicate.jpg
duplicate_1.jpg
duplicate_2.jpg

Is there any way to make it start at the first file?
Thanks
John

Re: Bulk Rename Strip characters

PostPosted: Wed Jan 11, 2017 6:04 pm
by KenP
jmacp wrote:Is there any way to make it start at the first file?

Sorry I don't know of any way to do that, it may be possible in BRU with Javascript but I'm not aware of any other way to do it.