BATCH SORT MY FILENAME - LAST DIGIT

Post any Bulk Rename Utility support requirements here. Open to all registered users.

BATCH SORT MY FILENAME - LAST DIGIT

Postby dbarnes » Wed Sep 15, 2010 9:46 pm

Hi, We use BRU at office for renaming files, etc...
Can BRO batch sort by the last digit in filename?
Example below. Would like to sort into 2 groups - group A and Group B.

SID_12064_1966_0000001A
SID_12064_1966_0000001B
SID_12064_1966_0000002A
SID_12064_1966_0000002B
SID_12064_1966_0000003A
SID_12064_1966_0000003B , etc...

Many thanks.
dbarnes
 
Posts: 1
Joined: Wed Sep 15, 2010 9:39 pm

Re: BATCH SORT MY FILENAME - LAST DIGIT

Postby DefAnt » Thu Sep 16, 2010 2:53 pm

You could use the BRU to move the A and B to the front of the file name. Allowing you to sort it into the 2 groups like that.

RegEx
Match (.+)([A-B])
Replace \2\1

I believe the [A-B] allows it to determine if it's a Letter A or B then it will recognize it and store it into variable 2. Allowing you to move it to the front of the file name. :)

I am not 100% sure of the RegEx, so test it visually before you Rename just to be sure. And only if this was what you wanted because Sorting is done by the first characters in a file name, thus you have to move the "group variable" to the front not the back of the file name :)
DefAnt
 
Posts: 16
Joined: Tue Sep 14, 2010 7:28 pm
Location: New Jersey, USA


Return to BRU Support


cron