Rename files with folders and subfolders name modification

Bulk Rename Utility How-To's

Rename files with folders and subfolders name modification

Postby ploplopli » Sat Apr 26, 2025 2:45 pm

Hello everyone,

What a nice tool to rename your files, quite powerful.

I am looking for some help in renaming my files and not sure it is possible.

My files are stored as following

Photo
---->2009
---->2010
---->2011
---->….
----> 2025
---------->01 - January - Vacation
---------->02 - February – Vacation
---------->03 - March – Vacation
--------------------------->01 - Photo M
--------------------------->02 - Photo A
--------------------------->03 - Photo C
------------------------------------->Photo 1
------------------------------------->Photo 2
------------------------------------->Photo 3

I would like my photo name to take the folder and subfolders name, which I managed properly by setting up the following

Name(2) - Remove

Append folder name (9):
name: prefix
sep: -
levels: 3

Numbering(10):
mode: suffix
Start: 1
Pad: 3
folder: check

extension(11):
lower (I prefer in lower case)

filters(12):
files : check
subfolders: check


the files is renamed properly, as follow: 2025 - 03 - March - Vacation - 2 - Photo C - 001.jpg

My question is will it be possible to rename the file as follow: 2025 - March - Vacation - Photo C - 001.jpg, so removing the number at the begining of each folders?

Thank you very much for your feedback and support.
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby TheGhost78 » Sat Apr 26, 2025 6:08 pm

Two steps:

Append Folder Name (9):
Name: Prefix
Sep: space dash space
Levels: 2

Then

RegEx (1):
(\d{4}) - (\d{2}) - (.*)
\1 - \3

If you have the licence, you can set Append Folder Name (9) before RegEx (1) in Special (14), Order and do it in one go.

Personally, I would keep 03 to maintain the chronology in the filename, otherwise it reverts to alphabetical for the months instead of numerical for the months.
TheGhost78
 
Posts: 177
Joined: Fri Jul 19, 2024 11:25 am

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Sat Apr 26, 2025 7:06 pm

Thank you for the feedback

You are right, I should keep the 03 for better management.

But I would like to delete the number before Photo C.

I am trying to understand the formula you gave me but I can't, could you explain it to me?

Thank you
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby TheGhost78 » Sun Apr 27, 2025 7:26 am

(\d{4}) - (\d{2}) - (\w+) - (\w+) - (\d+) - (.*)

\1 - \2 - \3 - \4 - \6


1: (\d{4}) matches four digits
2: (\d{2}) matches two digits
3: (\w+) matches a word
4: (\w+) matches a word
5: (\d+) matches at least one digit
6: (.*) matches the rest of the filename.

\1 to \6 corresponds to the matches above. You want to keep all but the fifth match, so leave that out.
TheGhost78
 
Posts: 177
Joined: Fri Jul 19, 2024 11:25 am

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Sun Apr 27, 2025 2:13 pm

Amazing, thanks a lot, I will be able to use it for others files as well.

Thanks again
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Mon Apr 28, 2025 7:13 pm

I don't understand, I was able to make it work and now nothing is changing.

Am I doing someting wrong in the parameters?

Image
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Mon Apr 28, 2025 7:15 pm

Image
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby TheGhost78 » Mon Apr 28, 2025 7:50 pm

Append (9) first
then
RegEx (1) second

Untick Append (9) after running it.
TheGhost78
 
Posts: 177
Joined: Fri Jul 19, 2024 11:25 am

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Mon Apr 28, 2025 9:08 pm

It was my mistake, I forgot to change the order of tasks.

My monthly folder with place of visit are not always having the same number of words, and I see that if the I put one (\w+) but the name has 2 or more the regex does not work. but if I adjust it properly it is working

is there a way to have the regex not checking the number of word, but only be applied on the last folder used to store the picture

Example of monthly folder name
01 - January - AD
02 - February - Fossil Rock
12 - December - Hot air Balloon ride

In each of these monthly folders we have the storing folder
01 - Photo A
02 - Photo B
03 - Photo C
04 - Photo D
05 - Photo E

on which I would like to remove the numbering before Photo

I will buy the paid version to support the project as the tool is fantastic.
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm

Re: Rename files with folders and subfolders name modification

Postby ploplopli » Mon Apr 28, 2025 9:23 pm

found the solution, I added a dot on the second \w+

here is my regex

(\d{4}) - (\d{2}) - (\w+) - (\w.+) - (\d+) - (.*)
\1 - \2 - \3 - \4 - \6
ploplopli
 
Posts: 7
Joined: Sat Apr 26, 2025 2:20 pm


Return to How-To