Page 1 of 1

How to rename files based on parent folder name + increment

PostPosted: Fri Oct 09, 2020 12:55 am
by Rexx Fernandez
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.

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

PostPosted: Fri Oct 09, 2020 1:42 am
by Rexx Fernandez
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!

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

PostPosted: Thu Oct 22, 2020 12:48 pm
by Code Killer
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