Page 1 of 1

Re: how to rename - add 20 in front of name if it starts with 18

PostPosted: Thu Oct 24, 2019 4:57 pm
by therube
1:RegEx
Code: Select all
Match:  ^(18\d\d\d\d.*)$
Replace:  20\1

Match all files that start with 18, followed by 4 digits, followed by anything else.
Prefix those files with, 20.

---

Alternatively, you could pre-select, by various means, only files that start with 18, & then use:

7:Add -> Prefix: 20

One method to select would be:

12:Filters -> Mask: ^18\d\d\d\d (& checkmark, RegEx, box)

Re: how to rename - add 20 in front of name if it starts with 18

PostPosted: Thu Oct 24, 2019 5:30 pm
by Growltiger
I would do it in two steps.
1. Add a 20 to the start of every filename.
Now some start 202018... and some start 2018...
2. Replace 2020 by 20 in every file.

Re: how to rename - add 20 in front of name if it starts with 18

PostPosted: Thu Oct 24, 2019 5:32 pm
by Growltiger
Growltiger wrote:I would do it in two steps.
1. Add a 20 to the start of every filename.
Now some start 202018... and some start 2018...
2. Replace 2020 by 20 in every file.


Sorry, ignore this - I had missed that some files don't have a date at all.

Re: how to rename - add 20 in front of name if it starts with 18

PostPosted: Fri Oct 25, 2019 2:18 am
by Admin
For the records, if you have a commercial license for BRU, then you can use a simple javascript routine:

Code: Select all
if (name.substring(0,2)== '18') newName = '20' + name;


JAVASCRIPT renaming is only supported with a commercial license.

thanks