Sequential numbering changed by file name

A swapping-ground for Regular Expression syntax

Sequential numbering changed by file name

Postby prpics » Tue Nov 16, 2010 10:02 pm

Hi from London, UK

As I have deleted images over time within a folder, the numbers of my football pictures, while all following the same format are not sequential. Eg:

Chelsea-075
Chelsea-126
Chelsea-876
Manchester United-021
Manchester United-500

I’ve tried the renumbering feature (which works fine if Chelsea & Manchester United were the same length – but they are not) and read the forum posts with no luck – unless I missed it. If so, please point me in the right direction.

BRU needs to read the entire file name otherwise (example only, using BRU renumber) Manchester United just follows on sequential numbering from the numbering of Manchester City.

How do I get BRU to rename the files, starting at 001 each time an entire file name changes so I end up with?

Chelsea-001
Chelsea-002
Chelsea-003
Manchester United-001
Manchester United-002

Etc ..

So as soon as the entire string of the file name changes, no matter how long, the number re-starts at 001 and continues incrementing by one until the file name changes again.

I am a simply a user of BRU, so the help of an expert would be very much appreciated.

Thank you, in anticipation that it can be done.
prpics
 
Posts: 3
Joined: Tue Nov 16, 2010 9:16 pm

Re: Sequential numbering changed by file name

Postby Admin » Wed Nov 17, 2010 12:09 pm

Use the Selection (12) to select first "chelsea", then "manchester" etc, and combine that with the numbering.
Admin
Site Admin
 
Posts: 2350
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sequential numbering changed by file name

Postby prpics » Thu Nov 18, 2010 8:31 pm

Hi - Thanks for the fast response, I can see that will work for a few files.
Perhaps I should have mentioned I have over 100,000 files, about 5000 per folder, so I was looking for some ‘automated’ way per folder. My example was in a basic form, in truth my file groups are more than just the club name. Regards. P
prpics
 
Posts: 3
Joined: Tue Nov 16, 2010 9:16 pm

Re: Sequential numbering changed by file name

Postby Admin » Fri Nov 19, 2010 8:34 am

A pattern that BRU can use to rename the files must be identified: do all file names end with a - and then 3 numbers?
Admin
Site Admin
 
Posts: 2350
Joined: Tue Mar 08, 2005 8:39 pm

Re: Sequential numbering changed by file name

Postby prpics » Fri Nov 19, 2010 8:04 pm

Hi -

Yes, I can get them all to end with dash and four digits -0001 to -9999

Regards P
prpics
 
Posts: 3
Joined: Tue Nov 16, 2010 9:16 pm


Return to Regular Expressions