Sort into sub folder by year, then month?

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hi,
Previously I had this rule working but I hadn't synced by Hazel rules and now have a new computer.
My use case is simple.

I take a lot of screenshots and have them in a dedicated screenshot folder.

I want screenshots older than 14 days sort them self into 2024, and inside 2024 I want to have 7 folders (so far of the year), 01,02,03,04,05,06,07.

I tried to set the date pattern to 1999-12.
Then it created a folder in the screenshots root called 2024-06
I then tried to have 2 date created with the > in between them and have 1999 > 12
But then I got a ton of 2024 (Unicode Encoding Conflict) and it created several 2024 folders.

How do I get Hazel to understand if 2024, 2023 etc exists in the root it should sort the files by the date/month in there?

I want my 2024 folder to look like this

https://ibb.co/ZmcGLT7
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Can you post screenshots of your rule? Also, can you post the "Unicode Encoding Conflict" errors?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Yes, of course.

Here's how the rule looks like and some rule matching on some files.
https://ibb.co/Rb6mvp9

The date pattern. I picked date created and just kept year, then > then month.
https://ibb.co/q5ysLzX
https://ibb.co/Wgbb1L3

The folder conflict, is not an error message but I guess it's because since 2024 already exist here it tries to create it again but add the conflict text?
https://ibb.co/WkTZKj7
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Is this on Dropbox by chance? Looking it up, it seems to be a Dropbox specific issue.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

It is on Dropbox.
But it was on Dropbox previously too when it worked.
(I just didn't have the rule synced unfortunately for when I got a new computer).

If I'm vaguely remembering it had something with folder depth to do?
But not sure why it's not adding 01, 02 inside of 2024.

And previously I never got the Unicode Encoding issues either.
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Can you test it on a non-Dropbox folder?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

That worked (on the desktop).
I tried to add "old" in front of everything called 2024, 2023, 2022 in the screenshots folder and when I dragged some files back it sorted them into 2024 > 06 and 07 as I wanted. So far so good.

But when I dragged some other files back to the root in screenshots to see if it could sort them in under 06 and 07, it created that conflict again where it's trying to create a new 2024 folder that's already existing.

I try the same thing by dragged older files onto Desktop and there it sort them as expected.

I'm not sure why it's a problem just because it's in Dropbox folder?
I have my whole OS except the desktop, downloads on Dropbox.

Also part of why I have screenshots in Dropbox is they have a built in feature and I can share the url quickly with others etc.

Is there away around this that if the year exist it sort under its months even on Dropbox?
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

I had a couple of instances now on the Desktop too with Unicode Encoding Conflict.
But just happened twice, compared to all the time under Screenshots.
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Can you give very specific steps on how to replicate this on your Desktop folder?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I hold down alt and drag the rule to desktop from screenshots.
That's all I did.

I then moved some older screenshots from screenshots to desktop to test the rule and it sorted them fine into 2024 and created sub folders inside, 06 and 07.

Later I moved more files from screenshots to desktop and a couple of times I got the Unicode error with duplicated folders, that happened for every new sort on Screenshots.

Will there be an update for Hazel so it will work the same for files in Dropbox too?
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Now it keeps doing the Unicode error on the desktop as well.
https://ibb.co/wcTyfXT

Only time it didn't do it was when there were no 2024 folder and it moved files for the first time.
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Looking at your screenshots again, I'm a bit confused. Your rule status shows a "Sort into subfolders" matching those files but none of your rules in that list are named that.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

It matches.
I probably just added 14 Days - as a prefix to have a clearer name.

https://ibb.co/wC2hXns
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Can you find where this is happening in the logs and post the log messages showing this?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Could you guide me on how to share logs?
Not sure how to do that.
ModestBukowski
 
Posts: 14
Joined: Sun Oct 16, 2022 8:28 pm

Next

Return to Open Discussion