Searching for help with nested / cascaded conditions

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

Moderator: Mr_Noodle

Sorry for this post. I'm searching the forum and the internet for a while now but can't find a solution.

What I would like to archive: Got a folder with backups. I want to keep ONE file older than 3 month, deleting all the older ones.

What I did:

Creating this one rule for the folder in question.

"all" conditions shall be met
* condition "Date created" "is not" "this quarter"
* (nested) condition "Date created" "is not among" the 1 "most recent"

--->
"move" to folder "trash"

But Hazel keeps deleting all files older than "this quarter".

What am I doing wrong?
And general question: How can I filter filtered files further? I would have assumed that is the purpose of nested conditions.
SortOfSorter
 
Posts: 2
Joined: Thu Nov 07, 2024 2:00 pm

Try the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the results of each test.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Try the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the results of each test.


Thank you! Here we go:

The Files:

Image

Preview for file_1 - latest from yesterday (should be kept):

Image

Preview for file_2 - the second latest from a few weeks ago (should be kept):

Image

Preview for file_3 - the latest under those not from this Quarter (should be kept):

Image

Preview for file_4 - not the latest under those not from this Quarter (should be deleted):

Image

Rule Status:

Image

Log file:

Code: Select all
2024-11-08 18:01:01.956 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Thread 0x600003494300: Run worker for folder: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive
2024-11-08 18:01:01.956 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Task already running for folder [3153]: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive
2024-11-08 18:01:03.041 hazelworker[3153] DEBUG: Could not read Mail preferences.
2024-11-08 18:01:03.042 hazelworker[3153] DEBUG: About to process directory /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive
2024-11-08 18:01:03.044 hazelworker[3153] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2024-11-08 18:01:03.047 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated !=[cd] thisQuarter result: 0
2024-11-08 18:01:03.047 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-10-22 11:23:31 +0000 Ref date: 2024-11-08 17:01:03 +0000
2024-11-08 18:01:03.047 hazelworker[3153][PREDICTION] DEBUG: Handling EQUAL/TRUE or NOTEQUAL/FALSE
2024-11-08 18:01:03.047 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 2025-01-01 00:00:00.000
2024-11-08 18:01:03.048 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated hazelIsInTheTop: 1 result: 0
2024-11-08 18:01:03.048 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-10-22 11:23:31 +0000 Ref date: 2024-11-08 17:01:03 +0000
2024-11-08 18:01:03.048 hazelworker[3153][PREDICTION] DEBUG: Handling CUSTOM SELECTOR
2024-11-08 18:01:03.049 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 4001-01-01 01:00:00.000
2024-11-08 18:01:03.049 hazelworker[3153][PREDICTION] DEBUG: Predicted fire time for file: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive/file_2.pdf and rule Backups der drei letzten Monate behalten: 2025-01-01 00:00:00.000 Should poll: 0
2024-11-08 18:01:03.049 hazelworker[3153] DEBUG: file_2.pdf: Did not match any rules.
2024-11-08 18:01:03.050 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated !=[cd] thisQuarter result: 0
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-11-07 17:23:05 +0000 Ref date: 2024-11-08 17:01:03 +0000
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Handling EQUAL/TRUE or NOTEQUAL/FALSE
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 2025-01-01 00:00:00.000
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated hazelIsInTheTop: 1 result: 1
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-11-07 17:23:05 +0000 Ref date: 2024-11-08 17:01:03 +0000
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Handling CUSTOM SELECTOR
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 4001-01-01 01:00:00.000
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Bail out: AND predicate
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Bail out: AND predicate
2024-11-08 18:01:03.051 hazelworker[3153][PREDICTION] DEBUG: Predicted fire time for file: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive/file_1.zip and rule Backups der drei letzten Monate behalten: 4001-01-01 01:00:00.000 Should poll: 0
2024-11-08 18:01:03.051 hazelworker[3153] DEBUG: file_1.zip: Did not match any rules.
2024-11-08 18:01:03.051 hazelworker[3153] DEBUG: Removed entry for file file_4.PDF.
2024-11-08 18:01:03.051 hazelworker[3153] DEBUG: Removed entry for file file_3.zip.
2024-11-08 18:01:03.051 hazelworker[3153] DEBUG: Removed entry for file file_5.zip.
2024-11-08 18:01:03.052 hazelworker[3153] DEBUG: Writing out DB file for /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive to path: /Users/user/Library/Application Support/Hazel/16777240-2792271.hazeldb
2024-11-08 18:01:03.053 hazelworker[3153] DEBUG: Directory /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive processed in 0.011506 seconds
2024-11-08 18:01:03.054 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Checking events for path /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive, folder Tower Flashdrive
2024-11-08 18:01:03.055 hazelworker[3153] DEBUG: Received file event: {
    date = "2024-11-08 17:01:01 +0000";
    path = "<NoodlePathSet: 0x6000038c86c0>\n  /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Gera\U0308te-Backups/Tower Flashdrive/file_4.PDF : 0\n  /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Gera\U0308te-Backups/Tower Flashdrive/file_3.zip : 0\n  /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Gera\U0308te-Backups/Tower Flashdrive/file_5.zip : 0\n";
}
2024-11-08 18:01:03.055 hazelworker[3153] DEBUG: Sleeping
2024-11-08 18:01:05.133 hazelworker[3153] DEBUG: Could not read Mail preferences.
2024-11-08 18:01:05.134 hazelworker[3153] DEBUG: About to process directory /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive
2024-11-08 18:01:05.134user hazelworker[3153] DEBUG: Event paths updated: <NoodlePathSet: 0x6000038cd520>
  /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive : 1
  /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive/file_4.PDF : 0

2024-11-08 18:01:05.137 hazelworker[3153] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2024-11-08 18:01:05.139 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated !=[cd] thisQuarter result: 0
2024-11-08 18:01:05.139 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-10-22 11:23:31 +0000 Ref date: 2024-11-08 17:01:05 +0000
2024-11-08 18:01:05.139 hazelworker[3153][PREDICTION] DEBUG: Handling EQUAL/TRUE or NOTEQUAL/FALSE
2024-11-08 18:01:05.139 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 2025-01-01 00:00:00.000
2024-11-08 18:01:05.141 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated hazelIsInTheTop: 1 result: 0
2024-11-08 18:01:05.141 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-10-22 11:23:31 +0000 Ref date: 2024-11-08 17:01:05 +0000
2024-11-08 18:01:05.141 hazelworker[3153][PREDICTION] DEBUG: Handling CUSTOM SELECTOR
2024-11-08 18:01:05.141 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 4001-01-01 01:00:00.000
2024-11-08 18:01:05.141 hazelworker[3153][PREDICTION] DEBUG: Predicted fire time for file: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive/file_2.pdf and rule Backups der drei letzten Monate behalten: 2025-01-01 00:00:00.000 Should poll: 0
2024-11-08 18:01:05.142 hazelworker[3153] DEBUG: file_2.pdf: Did not match any rules.
2024-11-08 18:01:05.143 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated !=[cd] thisQuarter result: 0
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-11-07 17:23:05 +0000 Ref date: 2024-11-08 17:01:05 +0000
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Handling EQUAL/TRUE or NOTEQUAL/FALSE
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 2025-01-01 00:00:00.000
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Calculating fire time - predicate: dateCreated hazelIsInTheTop: 1 result: 1
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Date value: 2024-11-07 17:23:05 +0000 Ref date: 2024-11-08 17:01:05 +0000
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Handling CUSTOM SELECTOR
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Next fire time: 4001-01-01 01:00:00.000
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Bail out: AND predicate
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Bail out: AND predicate
2024-11-08 18:01:05.144 hazelworker[3153][PREDICTION] DEBUG: Predicted fire time for file: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive/file_1.zip and rule Backups der drei letzten Monate behalten: 4001-01-01 01:00:00.000 Should poll: 0
2024-11-08 18:01:05.144 hazelworker[3153] DEBUG: file_1.zip: Did not match any rules.
2024-11-08 18:01:05.144 hazelworker[3153] DEBUG: Writing out DB file for /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive to path: /Users/user/Library/Application Support/Hazel/16777240-2792271.hazeldb
2024-11-08 18:01:05.146 hazelworker[3153] DEBUG: Directory /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive processed in 0.012303 seconds
2024-11-08 18:01:05.147 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Checking events for path /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive, folder Tower Flashdrive
2024-11-08 18:01:05.147 hazelworker[3153] DEBUG: Writing out DB file: /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive
2024-11-08 18:01:05.149 hazelworker[3153] DEBUG: Sending metrics to scheduler. Next scheduled run: 2025-01-01 00:00:00.000
2024-11-08 18:01:05.150 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Received metrics for folder /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive: {
    directoryDepth = 0;
    requestedSchedulingTime = "2024-12-31 23:00:00 +0000";
    triggerPaths = "<NoodlePathSet: 0x6000021b91a0>\n";
    unavailablePaths = "{(\n)}";
}
2024-11-08 18:01:05.150 hazelworker[3153] Done processing folder Tower Flashdrive
2024-11-08 18:01:05.150 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Timer scheduled for folder /Volumes/Macintosh EXT/Userdaten/user_Daten/Documents/Geräte-Backups/Tower Flashdrive at 2024-12-31 23:00:00 +0000
2024-11-08 18:01:05.152 86Z3GCJ4MF.com.noodlesoft.HazelHelper[678] DEBUG: Thread 0x600003494300: Task removed: [3153]
SortOfSorter
 
Posts: 2
Joined: Thu Nov 07, 2024 2:00 pm

Note that date modified and date created are not the same. In preview mode, click on the red X for any conditions that don't match to see what the date created is.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support