Subfolder rename from CSV

Bulk Rename Utility How-To's

Subfolder rename from CSV

Postby FXLEWIS » Mon Dec 08, 2025 8:40 pm

I was given a CSV with a listing of 100+ subfolder names that need to be changed.

Example -

Original Change To

\02._FDL_Submissions\ \02.FDL_Subs\

The problem is I only have the subfolder name. I don't have the full path.

As per the BRU guide:

Specifying Full Paths
You can also specify full paths, such as c:\folder\track1.mp3, in the first column for the old file names.
Then Bulk Rename Utility will match these names against the full path and not just the file name.
Partial / relative paths are not supported.

Example:

c:\folder1\Track001.mp3|Headlong.mp3

c:\folder2\Track002.mp3|Rushes.mp3

c:\folder3\Subfolder\TRACK003.mp3|AnywhereIs.mp3


I know the root folder where all the subfolders are located but they are scattered among other subfolders starting at the root. So I know the folders in my CSV are in T:\TST\GUIDES but there subfolders under GUIDES and then subfolders in those subs, etc.

Can I just use as input 02._FDL_Submissions and change as 02.FDL_Subs and have BRU search all of the subfolders below C:\TST\GUIDES and do the replacement?

TIA

Lewis
FXLEWIS
 
Posts: 5
Joined: Fri Dec 05, 2025 11:16 pm

Re: Subfolder rename from CSV

Postby FXLEWIS » Mon Dec 08, 2025 10:26 pm

Disregard. I figured it out.
FXLEWIS
 
Posts: 5
Joined: Fri Dec 05, 2025 11:16 pm

Re: Subfolder rename from CSV

Postby Admin » Tue Dec 09, 2025 11:26 pm

Use the Import Rename-Pairs CSV with just the old folder name in column 1 and the new folder name in column 2, then have Bulk Rename Utility scan the root with Subfolders enabled so it will find and rename matching folder names anywhere beneath that root.

Step-by-step:

1. In BRU, navigate to your root folder (T:\TST\GUIDES) in the left tree.
2. In Filters (12) enable:
- Folders (so folders are listed)
- Subfolders (so BRU does a recursive scan)
- Optionally set Lvl if you want to limit depth.
3. Prepare your CSV as OldName,NewName lines (you may use pipe or comma). Example:
02._FDL_Submissions,02.FDL_Subs
(You may omit paths — BRU will match the folder name itself.)
4. Actions > Import Rename-Pairs and select that CSV. BRU ignores case when matching.
5. Actions > Import Rename-Pairs > Select Imported Rename-Pairs to select the matching items in the list. Inspect the New Name column to confirm matches.
6. Preview and verify the list carefully. If everything looks correct, click Rename.

Notes:
- The import matches the name (or full path if you provided full paths). Because you only provided the folder name, BRU will match any folder with that name anywhere under the scanned root — so multiple folders with the same name will all be renamed.
- If you intend to rename folders (not files), make sure Folders is checked and review the preview. BRU refreshes the list automatically after folder renames when using recursive mode.
- Backup or test on a copy first (or run a small subset) — folder renames are disruptive and sometimes hard to undo.
- If you need to target only specific occurrences (e.g., only folders in certain subpaths), you must supply full paths in the CSV or use a filter/condition to restrict the selection.
Admin
Site Admin
 
Posts: 3126
Joined: Tue Mar 08, 2005 8:39 pm

Re: Subfolder rename from CSV

Postby FXLEWIS » Fri Jan 02, 2026 11:18 pm

Thanks. Follow up to my original post.

Here is a sample of my rename-pairs file:

COMMITTEE,CMTE
COMPLIANCE,CMP
CONTINUITY,CONT
CONTROL,CTRL
CORP,CRP
CORPORATE,CRP
COVER,CVR
CUSTOMER,CUST
DEPARTMENT,DEPT
DEPOSIT,DEP
DIRECTOR,DIR
DIRECTORS,DIR
DOCUMENTATATION,DOC
DOCUMENTS,DOC

I want to use the CSV file to change the name of any subfolder where the original name exists and replace it with the new name. This needs to work if there are multiple matches in the folder/subfolder.

For example, the original folders

COMMITTEE
COMMITTEE \ CONTROL_CORP_ESSAY
COMMITTEE \ CONTROL \ DEPOSIT
CORPORATE \ DIRECTOR \ DEPARTMENT

Would become
CMTE
CMTE \ CTRL \ CRP_ESSAY
CMTE \ CTRL \ DEP
CMTE \ CTRL \ DEPT
CRP \ DIR \ DEPT

I do not need to rename files, only folders/subfolders

One more note, I need to replace all spaces in folders with an underscore and I can't figure out how to get that to work in the CSV.

TIA

FL
FXLEWIS
 
Posts: 5
Joined: Fri Dec 05, 2025 11:16 pm

Re: Subfolder rename from CSV

Postby FXLEWIS » Fri Jan 02, 2026 11:21 pm

Had a typo

This - CMTE \ CTRL \ DEPT
Should be CMTE \ CTRL \ DEP
FXLEWIS
 
Posts: 5
Joined: Fri Dec 05, 2025 11:16 pm

Re: Subfolder rename from CSV

Postby Admin » Sat Jan 03, 2026 9:19 am

You can do this without CSV by using RegEx (1) with multiple Match/Replace pairs (one pair per mapping) and a final rule to convert spaces to underscores. Steps and a safe example follow.

Summary of approach
- Use RegEx (1) with the multiple RegEx editor to create one match/replace pair for each CSV line (match the whole word, replace with the abbreviation).
- Enable folders and subfolders in Filters so BRU lists and processes folder names.
- Add one extra RegEx pair to turn spaces into underscores (global).
- Preview thoroughly and back up before running Rename.

Step?by?step (recommended)
1. Open the folder containing your folders in Bulk Rename Utility.
2. In Filters (12):
- Check Folders = ON.
- Check Subfolders = ON (so nested folders are listed).
- Optionally set Lvl to limit recursion depth.
3. Click RegEx (1) panel.
- Tick Inc. Ext. is irrelevant for folders; leave it off.
- Click the multiple RegEx editor icon (the list editor) to add many Match/Replace pairs.
4. In the multiple RegEx editor add one row per mapping. Use word-boundary anchors (\b) and global (/g) so each occurrence in the folder name is replaced. Example rows (Match column / Replace column):

Match: \bCOMMITTEE\b/g
Replace: CMTE

Match: \bCOMPLIANCE\b/g
Replace: CMP

Match: \bCONTINUITY\b/g
Replace: CONT

Match: \bCONTROL\b/g
Replace: CTRL

Match: \bCORP\b/g
Replace: CRP

Match: \bCORPORATE\b/g
Replace: CRP

Match: \bCOVER\b/g
Replace: CVR

Match: \bCUSTOMER\b/g
Replace: CUST

Match: \bDEPARTMENT\b/g
Replace: DEPT

Match: \bDEPOSIT\b/g
Replace: DEP

Match: \bDIRECTOR\b/g
Replace: DIR

Match: \bDIRECTORS\b/g
Replace: DIR

Match: \bDOCUMENTATATION\b/g
Replace: DOC

Match: \bDOCUMENTS\b/g
Replace: DOC

// final row: replace any spaces with underscore (global)
Match: \s+/g
Replace: _

Notes on those entries
- Use \b to avoid partial-word replacements (so CORP won't match part of another token).
- The trailing /g on each Match tells BRU to replace all occurrences in the name (not just the first). The docs require adding /g to the Match pattern to perform global replacement.
- If you want case?insensitive matching, add /i (e.g. \bcommittee\b/gi) or use uppercase in the CSV and ensure filenames match case or add /i.
- The last rule converts any whitespace to underscores (global). If you only want spaces (not tabs), you can use a literal space in the match: (space)/g but \s+/g is usually fine.

5. After entering all pairs, click OK to close the editor.
6. In the main file list select the folders you want to process (or leave all selected).
7. Use Preview (or watch the New Name column) to verify the resulting folder names and the paths shown in New Name. Confirm that nested folder names are changed as you expect.
8. When satisfied, click Rename.

Extra points / safety
- Always run Preview first and test on a small copy of your folder tree.
- If a mapping can clash (two different folders become the same name under a parent), BRU will warn — check for name collisions.
- If some folder names contain punctuation you want preserved, check the regex patterns so you only replace tokens you mean to.
- If your CSV contains commas or quoted fields, it’s easier to paste or type the mapping into the multiple RegEx editor as shown above.
Admin
Site Admin
 
Posts: 3126
Joined: Tue Mar 08, 2005 8:39 pm

Re: Subfolder rename from CSV

Postby Admin » Sat Jan 03, 2026 9:21 am

With Replace (3) instead of Regex (1)

1) Prepare BRU so it will rename folders under subfolders
- In the main BRU window -> Filters (12): check Folders ON, Files OFF (so you only rename folders).
- Also check Subfolders ON (and set Lvl as needed) so BRU lists every folder/subfolder you want processed.

2) Open Replace (3) Multiple Replacements editor
- In Replace (3) click the multiple-replacements button (the two-column editor next to the With field).

3) Build the replacement table
- In the left column put each original token (COMMITTEE, CONTROL, CORPORATE, etc.). In the right column put the replacement (CMTE, CTRL, CRP, …). Add one extra row: left = (single space) but easiest is enter a single space character in the left column, right = _ (underscore) to replace spaces with underscores.
- Example rows:
- COMMITTEE CMTE
- CONTROL CTRL
- CORPORATE CRP
- DIRECTOR DIR
- DEPARTMENT DEPT
- (space) _
- Tip: copy/paste from your CSV into the two-column editor — BRU accepts tab-separated columns. If your CSV is comma separated, convert commas to tabs (or open in Excel and copy the two columns then paste into the editor). If any names contain commas, use quotes when preparing the data and then convert to tab-separated before pasting.

4) Matching options
- In Replace (3) leave Match Case unchecked (so matching ignores case).
- Ensure the “First” checkbox is NOT checked (otherwise it will only replace the first occurrence). By default Replace will apply replacements to all occurrences in the name — that allows multiple matches in the same folder name.
- Do NOT use the \regex\ prefix here (we’re using literal replacements). If you need regex later, use RegEx(1) instead (RegEx(1) supports /g and more powerful patterns).

5) Preview and run (very important)
- Select all folders in the file list (CTRL+A) or the subset you want to rename.
- Check the New Name column to confirm the replacements look as you expect (you should see multiple tokens changed inside path segments and spaces become underscores).
- If everything looks correct click Rename. BRU will perform the rename and will offer undo if something goes wrong.
Admin
Site Admin
 
Posts: 3126
Joined: Tue Mar 08, 2005 8:39 pm

Re: Subfolder rename from CSV

Postby lorixa » Mon Jan 05, 2026 3:00 pm

Thanks for the detailed explanation! Using the RegEx method to handle multiple renames in Bulk Rename Utility seems like a smart approach. I’ll definitely try this for my folder renaming task! :wink: :lol:
lorixa
 
Posts: 1
Joined: Mon Jan 05, 2026 2:59 pm


Return to How-To