Rename Subfolders

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Rename Subfolders Sun Aug 27, 2023 10:34 am • by Paul1762
I wonder if anyone can help me correct an error after rename folders and subfolders:

I am using Hazel to sort Images into Folders and Subfolders:

I wanted to get a Folder Structure where my top level Folder is Raw, then the next Level would be Year, then the next Level would be Year/Month.

So I wanted the below:
Raw:
2021
2021.01
2021.02
2021.03
2021.04
2022
2022.01
2022.02
2022.03
2022.04
However, what I have ended up with is:
Raw:
2021
Raw.01
Raw.02
Raw.03
Raw.04
2022
Raw.01
Raw.02
Raw.03
Raw.04

Can anyone suggest a way of correcting this error?

Paul
Paul1762
 
Posts: 49
Joined: Sat Nov 08, 2014 5:32 pm

Re: Rename Subfolders Mon Aug 28, 2023 9:00 am • by Mr_Noodle
Can you post the rule you created to do this?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rename Subfolders Tue Aug 29, 2023 3:02 pm • by Paul1762
as requested please see the rule below
First Rule:
Go into Subfolder
if Kind is Folder
Do the following
Run Rules on Folder Contents
Second Rule
RenameFiles
If Any File
Do the following
Sort into subfolder with pattern Date Created yyyy
Sort into subfolder with pattern Source folder.Date Created mm
Paul1762
 
Posts: 49
Joined: Sat Nov 08, 2014 5:32 pm

Re: Rename Subfolders Wed Aug 30, 2023 9:22 am • by Mr_Noodle
I think the problem is that you included "Source Folder" in the pattern. Not sure why that's there but I suggest taking it out.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rename Subfolders Wed Aug 30, 2023 4:07 pm • by Paul1762
I only included that as I wanted the subfolder to have the YYYY.mm as the telltale of the folder...

thanks for the tip... I will amend the rule...

do you have any tips that would allow me to rename the folders from Raw.xx to YYYY.xx

Regards, Paul
Paul1762
 
Posts: 49
Joined: Sat Nov 08, 2014 5:32 pm

Re: Rename Subfolders Thu Aug 31, 2023 8:37 am • by Mr_Noodle
Where is the YYYY coming from?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rename Subfolders Thu Aug 31, 2023 4:44 pm • by Paul1762
I use the Created Date and format it to YYYY
Paul1762
 
Posts: 49
Joined: Sat Nov 08, 2014 5:32 pm

Re: Rename Subfolders Fri Sep 01, 2023 8:43 am • by Mr_Noodle
So you can set up a rule to match folders matching the pattern Raw.(• suffix) and then rename with the created year and suffix.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rename Subfolders Fri Sep 01, 2023 10:46 am • by Paul1762
That did not work... I wanted to rename the folders under 2016 to 2016.01, 2016.02 etc the Folder got renamed 2023.08.02, 2023.08.03 etc...

Paul
Paul1762
 
Posts: 49
Joined: Sat Nov 08, 2014 5:32 pm

Re: Rename Subfolders Mon Sep 04, 2023 8:44 am • by Mr_Noodle
You need to edit the format for the date attribute in your pattern to include the parts of the date/time you want to include.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron