add numbers to beginning of filename based upon content

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

add numbers to beginning of filename based upon content

Postby markoe2 » Tue Nov 06, 2018 5:13 pm

Hi all


Can you help me with the following:

- I have a large number of files (n = 117)
- The filenames are built up like this: 'part1_part2_part3.jpg', with part1 = "MAGEA4" or "MAGEA4NC", part2 = "04311120B0015S" or "04311120B0016S" or "04311121B0015S" or "04311121B0016S" or ..., part3 = "0.6" or "10" or "10b" or ... (https://imgur.com/a/yOwOIMp)

Now I want to rename these files by adding a ascending, sequential number to the beginning of the filename (e.g. filename1 = '1_...jpg', filename2 = '2_...jpg', filename3 = '3_...jpg').
Which file gets e.g. 1 and which one e.g. 33 is based upon the content of the different parts.

I want to give the files with filename where the first 9 characters of part 2 is the same and for which part 3 is the same, sequential, ascending numbers based upon the number in part 2. E.g. Files MAGEA4_04311120B0015S_0.6.jpg, MAGEA4_04311120B0016S_0.6.jpg, and MAGEA4NC_04311120B0017S_0.6.jpg should become 1_MAGEA4_04311120B0015S_0.6.jpg, 2_MAGEA4_04311120B0016S_0.6.jpg, and 3_MAGEA4NC_04311120B0017S_0.6.jpg.

Is it possible to achieve something like this with BRU? Or should I go to Excel first, write a macro and have it generate a file that BRU can use?

Please help, I have to do this a lot!!!

Much appreciated.
Kind regards
markoe2
 
Posts: 1
Joined: Tue Nov 06, 2018 5:01 pm

Re: add numbers to beginning of filename based upon content

Postby Admin » Thu Nov 08, 2018 9:41 pm

Hi, if you create the mapping from/to in Excel then you can import that in BRU via import rename pairs. Thanks
Admin
Site Admin
 
Posts: 2351
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support