Page 1 of 2

Sort into sub folder by year, then month?

PostPosted: Fri Jul 12, 2024 10:28 pm
by ModestBukowski
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

Re: Sort into sub folder by year, then month?

PostPosted: Mon Jul 15, 2024 8:47 am
by Mr_Noodle
Can you post screenshots of your rule? Also, can you post the "Unicode Encoding Conflict" errors?

Re: Sort into sub folder by year, then month?

PostPosted: Mon Jul 15, 2024 2:38 pm
by ModestBukowski
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

Re: Sort into sub folder by year, then month?

PostPosted: Tue Jul 16, 2024 8:41 am
by Mr_Noodle
Is this on Dropbox by chance? Looking it up, it seems to be a Dropbox specific issue.

Re: Sort into sub folder by year, then month?

PostPosted: Tue Jul 16, 2024 1:37 pm
by ModestBukowski
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.

Re: Sort into sub folder by year, then month?

PostPosted: Wed Jul 17, 2024 8:57 am
by Mr_Noodle
Can you test it on a non-Dropbox folder?

Re: Sort into sub folder by year, then month?

PostPosted: Wed Jul 17, 2024 12:59 pm
by ModestBukowski
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?

Re: Sort into sub folder by year, then month?

PostPosted: Thu Jul 18, 2024 6:57 am
by ModestBukowski
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.

Re: Sort into sub folder by year, then month?

PostPosted: Thu Jul 18, 2024 9:30 am
by Mr_Noodle
Can you give very specific steps on how to replicate this on your Desktop folder?

Re: Sort into sub folder by year, then month?

PostPosted: Fri Jul 19, 2024 10:07 am
by ModestBukowski
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?

Re: Sort into sub folder by year, then month?

PostPosted: Sat Jul 20, 2024 9:11 am
by ModestBukowski
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.

Re: Sort into sub folder by year, then month?

PostPosted: Mon Jul 22, 2024 8:46 am
by Mr_Noodle
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.

Re: Sort into sub folder by year, then month?

PostPosted: Mon Jul 22, 2024 6:34 pm
by ModestBukowski
It matches.
I probably just added 14 Days - as a prefix to have a clearer name.

https://ibb.co/wC2hXns

Re: Sort into sub folder by year, then month?

PostPosted: Tue Jul 23, 2024 8:56 am
by Mr_Noodle
Can you find where this is happening in the logs and post the log messages showing this?

Re: Sort into sub folder by year, then month?

PostPosted: Tue Jul 23, 2024 10:02 am
by ModestBukowski
Could you guide me on how to share logs?
Not sure how to do that.