Page 1 of 1

Auto taggin most recent draft

PostPosted: Sun Jul 19, 2020 10:35 pm
by ntabat
I have a folder that contains all of my writing projects. In each project folder I have a folder called drafts which has PDF exports for each draft I've done. I want Hazel to tag the newest PDF in each Draft folder as Current Draft. For the life of me I can't seem to get this to work.

Side Note: I also don't want to have to add a new folder to Hazel every time I start a new writing project.

Re: Auto taggin most recent draft

PostPosted: Mon Jul 20, 2020 10:12 am
by Mr_Noodle
Try using "is (not) among the X most recent". You can use that to match files that are the most recent, or not. You can then add or remove the tag as needed.

Re: Auto taggin most recent draft

PostPosted: Mon Jul 20, 2020 1:17 pm
by ntabat
Mr_Noodle wrote:Try using "is (not) among the X most recent". You can use that to match files that are the most recent, or not. You can then add or remove the tag as needed.


The problem is that this captures the most of recent of all files, not just the files in a specific drafts folder. To clarify the folder structure looks like this.

Projects
-Project A
--Drafts
---Draft 1
---Draft 2
---Draft 3
-Project B
--Drafts
---Draft 1
---Draft 2
---Draft 3
---Draft 4
-Category 1
--Project C
---Drafts
----Draft 1
----Draft 2
-Category 2
--Project D
---Drafts
----Draft 1
--Project E
---Drafts
----Draft 1
----Draft 2
----Draft 3

Rules I've tried:
-------------------

Rule 1:
If it's a folder, apply rules to contents

Rule 2:
If all
- A PDF
- Insider Folder called Drafts
- Among 1 most recent
Then
- Add tag

Rule 3:
Rule 2:
If all
- A PDF
- Insider Folder called Drafts
- Not Among 1 most recent
Then
- Remove tag

Re: Auto taggin most recent draft

PostPosted: Tue Jul 21, 2020 10:10 am
by Mr_Noodle
Can you elaborate on what's going wrong? What files are being tagged and which ones aren't?