How to rename files based on parent folder name + increment

Bulk Rename Utility How-To's

How to rename files based on parent folder name + increment

Postby Rexx Fernandez » Fri Oct 09, 2020 12:55 am

I have 3000 folders to rename!
Each folder has 2 files inside which also need to be renamed the same as the folder, but with an increment.

My example:
I need the folders to be called RPSB00001, RPSB00002, RPSB00003 etc.
This works by setting a fixed name of RPBS with a numbering pad of 4, start 1, inc 1.

But i also need the files inside to be named sequentially based on the folder name
The desired result is folder RPSB00001 to contain the 2 files inside it named
RPSB00001.jpg
RPSB00001.wav

Thanks in advance!
Rexx.
Rexx Fernandez
 
Posts: 2
Joined: Fri Oct 09, 2020 12:39 am

Re: How to rename files based on parent folder name + increment

Postby Rexx Fernandez » Fri Oct 09, 2020 1:42 am

Ok I've managed to do this by doing 2 separate actions.
1. Rename the folders only in the first pass.
2. Then rename the files

I created a .bru preset to rename just the folders with my critera
I created a 2nd .bru preset to rename just the files within the folders with my criteria

Load preset 1 and run.
Load preset 2 and run.

DONE!

I Love BRU!
Rexx Fernandez
 
Posts: 2
Joined: Fri Oct 09, 2020 12:39 am

Re: How to rename files based on parent folder name + increment

Postby Code Killer » Thu Oct 22, 2020 12:48 pm

Hey man,

I'm looking do do similar, just rename any files in the directory to a pre-set + the parent folder name and an an incremental number then copy them to another directory.

How did you manage to pull the folder name to the file name?

Cheers :D
Code Killer
 
Posts: 1
Joined: Thu Oct 22, 2020 12:41 pm


Return to How-To