Page 1 of 1

Precise subfolder diving by using "tag"

PostPosted: Mon Oct 05, 2015 8:04 am
by okaypol
Maybe somebody might use this code I by some miracle created yesterday.

It's diving into the folder that is needed and doing an action on that folder.

My problem was: everytime there is the YTS.jpg file if I download a torrent and I was really irritated that I would always have to delete them all by myself. Always.

So I wondered if Hazel could do it?!.

I went with this code first:

Image

Then this code:

Image

Last but not least:
Image


no.1: So literally, Hazel looks for purple tagged folders and goes into those folders. when all rules have been done on purple tagged folder "removes purple tag on the folder"

-if none is purple then it skips it.
-if it is purple then no.2(below) runs.

no.2 runs rules on folders: delete the file that contains file name: "www.yts.to" "

The last code: Goes into each folder and if it finds "www.yts.to" contains in a file name. it marks the folder purple.


So I am wondering what do people think? it this a Hazel breakthrough? :mrgreen:

Re: Precise subfolder diving by using "tag"

PostPosted: Mon Oct 05, 2015 1:57 pm
by Mr_Noodle
Thanks for the tip though I think you can get away with not tagging anything. Get rid of the first rule and change the action on the last one to "Run rules on folder contents". I believe that should get the same result with one less rule.

Re: Precise subfolder diving by using "tag"

PostPosted: Wed Nov 04, 2015 4:52 pm
by okaypol
Mr_Noodle wrote:Thanks for the tip though I think you can get away with not tagging anything. Get rid of the first rule and change the action on the last one to "Run rules on folder contents". I believe that should get the same result with one less rule.



Yeah, but if I do it that way I get a lot of notifications as it tried to move files from folder X to folder X but it can't...cuz it's the destination folder, any way around that?

Re: Precise subfolder diving by using "tag"

PostPosted: Wed Nov 04, 2015 4:56 pm
by Mr_Noodle
Not sure if I follow. That sound like you are moving an item into itself which means you set up a loop in your rule. The only rules I see above move to the trash so you shouldn't be getting that type of error.

Re: Precise subfolder diving by using "tag"

PostPosted: Thu Nov 05, 2015 5:24 am
by okaypol
Mr_Noodle wrote:Not sure if I follow. That sound like you are moving an item into itself which means you set up a loop in your rule. The only rules I see above move to the trash so you shouldn't be getting that type of error.



The same folder had if the main folder contains "Quantico and is movie then move to "Quantico" folder"

But yesterday night, I added to the "diving deep" to only dive deep if it's not blue colour tagged. That seems to work I just tag the "movie to" folder to blue and it doesn't dive deep. looks like that's working.

Image