Recursively Renaming Comics

A swapping-ground for Regular Expression syntax

Recursively Renaming Comics

Postby bulkrenameutility » Thu Apr 16, 2015 7:49 pm

I have been using BRU for a long time, and it has been a wonderful time saver :)

The Problem:

I scanned ~200 comics a few days ago. I need to rename them.

The comics are stored in a folder like this:

[Name] [Issue]

The individual images are named as follows:

[Name] [Issue] [Serial].jpg

I have only been able to automate the numbering for the serial, but not for the issue. Is there a method to automate the numbers for the serial, and for the issue?

For example, the final result of the renaming should be as follows:


Thor - God Of Thunder 01\
Thor - God Of Thunder 02\
Thor - God Of Thunder 03\
Thor - God Of Thunder 04\
Thor - God Of Thunder 21\
Thor - God Of Thunder 22\
Thor - God Of Thunder 23\

Files in Folder:

Thor - God Of Thunder 01\
Thor - God Of Thunder 01 01.jpg
Thor - God Of Thunder 01 02.jpg
Thor - God Of Thunder 01 03.jpg
Thor - God Of Thunder 01 04.jpg
Thor - God Of Thunder 01 05.jpg
Thor - God Of Thunder 01 06.jpg
Thor - God Of Thunder 01 21.jpg
Thor - God Of Thunder 01 22.jpg
Thor - God Of Thunder 01 23.jpg
Thor - God Of Thunder 01 24.jpg

Is it possible to rename all files and folders in one go? Assuming that there are no sub-folders, and that all the files are already in the proper order.

PS - the "\" at the end of names of folders is just for differentiating files from folders. It is not be added.
Posts: 1
Joined: Thu Apr 16, 2015 7:21 pm

Re: Recursively Renaming Comics

Postby bitmonger » Sat Apr 18, 2015 6:17 pm

I don't know if it can do all folders in one go, but it's probably safer to do them 1 folder at a time. If I understand your question, this can be done simply by using 2 fields in BRU.

For example lets assume you are in the folder of issue 01 and the filename is Testname.jpg

In the Add(7) area put the issue number for the folder in the Suffix field and 0 in the at pos. field
e.g if the issue is 01, put a space, 01 and a space in this field.

To put in the serial number
In the Numbering(10) area put
Mode Suffix
Start 1
Pad 2 (This works for numbering up to 99 files per issue - if more change accordingly)
At 0
Incr. 1

Because the Add function occurs before the Numbering function these occur in sequence and you end up with the issue remaining whatever is in the Add field followed by incrementing counter for the serial you end up with:

Testname 01 01.jpg
Testname 01 02.jpg
Testname 01 03.jpg
Testname 01 04.jpg
Testname 01 99.jpg


for each new folder just change the Add field with the new issue number and carry on.

Hope this help,
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Return to Regular Expressions