How To Search Large Folder

Bulk Rename Utility How-To's

How To Search Large Folder

Postby tstphnsn@aol.com » Sun Dec 28, 2025 10:04 pm

Hi.
I have to rename a large number of files that have various positional indicators ("B1" or "C2") embedded in the names and rename them with the position as the first characters. I can't find a way to search a folder for just the "B1"s so that I can rename them; and so on for the other positional indicators.

Is there a way to do this with this program??

Thanks very much,
Tom
tstphnsn@aol.com
 
Posts: 2
Joined: Sun Dec 28, 2025 9:59 pm

Re: How To Search Large Folder

Postby Admin » Mon Dec 29, 2025 1:21 am

You can do this easily with Bulk Rename Utility using either the Filter + normal Rename workflow or a single RegEx rename that moves the positional token (e.g. "B1", "C2") to the front.

Two approaches (pick one):

A — Quick: filter to show only one position at a time, then rename
1. Open the folder in BRU. In Filters (12) check "RegEx" and enter the pattern for the position you want (for example B1 or C2). Example to show only B1 files: B1
- You can also use a character class like B[0-9] to match B followed by any digit.
2. Select all files shown in the file list.
3. Use a simple Rename rule (e.g. Move/Copy (6) or Add (7)) or use RegEx(1) to reorder. Preview then click Rename.
Notes: filtering only affects what is displayed/selected — it doesn’t rename files outside the list.

B — One-pass regex: move any positional indicator to the start for all files
1. In RegEx (1) (left-most panel) enter a Match and Replace. Example that moves a token like B1 or C2 (single letter + single digit) wherever it appears to the front:
- Match: (.*?)([A-Z]\d)(.*)
- Replace: \2\1\3
2. Make sure Inc. Ext. is OFF (unless the token may be inside the extension). Leave other options default.
3. Select the files you want (you can use Filters (12) to restrict the set first), click Preview to verify, then Rename.

Explanation of the regex:
- (.*?) — minimal prefix (anything before the positional token)
- ([A-Z]\d) — captures the positional token (capital letter then digit). Change to (B[0-9]|C[0-9]|...) or [A-Za-z]\d or B[12]|C[12] etc to match your exact tokens
- (.*) — suffix after the token
Replace \2\1\3 places the token first, then original prefix and suffix.

Examples:
- If tokens are specifically "B1" or "C2" only:
- Match: (.*?)(B1|C2)(.*)
- Replace: \2\1\3
- If tokens are letter-digit (any letter, any digit):
- Match: (.*?)([A-Za-z]\d)(.*)
- Replace: \2\1\3

Tips and cautions
- Always click Preview to verify results before performing Rename.
- If you only want to affect the filename (not extension) ensure Inc. Ext. is OFF.
- If tokens can appear multiple times and you need special handling (first vs last occurrence), adjust the regex (e.g., greedy vs lazy matching) or run multiple passes.
- You can also use Filters (12) with simple masks (or RegEx) to process one token at a time if that’s safer.
Admin
Site Admin
 
Posts: 3123
Joined: Tue Mar 08, 2005 8:39 pm

Re: How To Search Large Folder

Postby TheGhost78 » Mon Dec 29, 2025 1:22 am

Filters (12)
Mask: .*B1.*
or
.*C2.*
etc
Tick RegEx

RegEx (1)
Match: (.*)(B1)(.*)
Replace: \2\1\3
Change the match to (.*)(C2)(.*), etc, for the other matches.


Or, change the match to (.*)([A-Z][0-9])(.*) for a more generic match, and the filter to .*[A-Z][0-9].*\..* for a more generic filter.
TheGhost78
 
Posts: 253
Joined: Fri Jul 19, 2024 11:25 am

Re: How To Search Large Folder

Postby tstphnsn@aol.com » Tue Dec 30, 2025 1:21 pm

Thank you, thank you very much for the fast and very detailed answers!! I really appreciate it.
I'm finishing a NA Bird Field Guide for Princeton with about 8,000 photos that the designer wants renamed, so your help is really saving the day!!!

Best regards,
Tom Stephenson
tstphnsn@aol.com
 
Posts: 2
Joined: Sun Dec 28, 2025 9:59 pm


Return to How-To


cron