Retarget a folder in order to delete it?

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

Moderator: Mr_Noodle

All my rules work up to the point where it has to delete a folder, "Episode" (that already had files removed from it with a previous rule), but it won’t delete it? [Screenshots 1-2 below]

In the "rule status" area, the rule that deletes the folder doesn’t show. Because I’m guessing, the "Episode" folder I want to delete (after all the other rules run), is already targeted by an earlier rule (that already has a "run rule on folder content" action). [Screenshot 3 below]

So it’s almost like I need Hazel to "retarget" the Episode folder, after I remove the PSDs and JPGs from it in a previous rule, and then delete it?

For the life of me I can‘t figure out how to do this.
It’s like it needs everything moved into another separate watched folder, with a new set of separate rules, just to delete the empty "Episode" folder?
Is that what syncing is for?
I’m at my wits end.
I just need an empty folder deleted and it’s the most impossible thing in the world?
Sorry just whining, been working on this for like 2 days straight.
Any help is greatly appreciated.


1. Before rules run
Image

2. After rules run
Image

3. Rule Status
Image
adobeOneShinobi
 
Posts: 2
Joined: Mon Apr 19, 2021 1:49 am

The screenshots aren't coming through but I'm guessing you need to reorder your rules to take rule precedence into account. If a folder is empty, you want to check that first before the rule to go into the subfolder (which you do not need to do if the folder is empty).
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I actually eventually got it to work, mainly by using the “continue matching rules” on the “Episode” folder, which later eventually gets deleted, as intended, finally, after the PSDs are moved out of there (and kept in the parent folder via adding “if" ... "it’s enclosing folder,” and the second set of rules hitting the “Episodes” folder prevents it from deleting prematurely (which was the constant case in my previous tests, all before the PSDs had a chance to be moved out of there) by including "sub-file/folder Count” is “0”.
Also of note is while testing, I had it on pause and would manually run it to test.
Where as to finally delete the lingering “Episode” folder a second run has to occur, so it takes two runs to finally get it to where I need it, with only the PSDs alone in the parent folder.
Hope that helps someone else experiencing the same road block or lack of clarity on how to put these rules together or on how to retarget, or affect again, a folder that was previously affected.
Cheers.

Also of note, the “rules status” is tricky also, cause it obviously can’t show the status of something until it gets into position, after being affected by the proceeding rules.
So knowing this you have to check out the status at different states of the folder’s processing phases that you’re trying to affect.
It was through that, that I was finally able to see that two different rules can in fact be applied to the same folder.
The two separate rules will be separated by a comma in the status view, and only be shown that way when the current state of the folders allows it to be.

Cheers and good luck all.
Hope that makes some type of sense.
adobeOneShinobi
 
Posts: 2
Joined: Mon Apr 19, 2021 1:49 am


Return to Support

cron