Page 1 of 1

Sort into subfolders rule issue

PostPosted: Fri Apr 14, 2017 2:06 pm
by gcoghill
I have a rule set that used to be working (and I can't recall what I changed), but looking over the rules I can't see where the issue is.

The rule is intended to sort the .txt files into subfolders with the pattern YEAR -> YEAR-MONTH using Hazel tokens.

So a file named "2017-04-17.txt" should end up in the folder "2017-04", which is contained in the folder "2017".

See screenshots for the rule set, the tokens used in the subfolder sorting rule, and the way Hazel is sorting the text files and naming the subfolders.

There is obviously consistency to the subfolder pattern, but I do not see how it it derived from my rules.

The renaming rule removes a double-underscore from the filename (and that seems to work fine).

My Finder screenshot doesn't include the parent folder, but that parent folder is named "Recaps".

Image

Re: Sort into subfolders rule issue

PostPosted: Fri Apr 14, 2017 4:07 pm
by Mr_Noodle
Screenshot isn't coming through. Can you try hosting it on a third party site and linking it here? Alternatively, email it in to support.

Re: Sort into subfolders rule issue

PostPosted: Fri Apr 14, 2017 4:31 pm
by gcoghill
It was up on Dropbox, I think I found the right method to display images.

Re: Sort into subfolders rule issue

PostPosted: Mon Apr 17, 2017 10:40 am
by Mr_Noodle
You'll have to check the logs to see exactly what is going on but I suspect the folder you are creating also matches the rule so it gets renamed and filed into its own subfolder. You will need to add conditions to the rule to prevent that.

Re: Sort into subfolders rule issue

PostPosted: Mon Apr 17, 2017 1:37 pm
by gcoghill
I believe I fixed this issue: I was using DATE tokens instead of CUSTOM TEXT tokens. So instead of pulling the numbers from the file name, it was calculating the current date and using those for the tokens.

Additionally, the date tokens were patterned differently in the rules (matching just year, month and day respectively) than they were in the actions (where they were patterned as full YYYY-MM-DD dates). Hence the repeated full date strings in the folder names.