Precise subfolder diving by using "tag"

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Precise subfolder diving by using "tag" 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:
okaypol
 
Posts: 10
Joined: Mon Sep 21, 2015 7:23 am

Re: Precise subfolder diving by using "tag" 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.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Precise subfolder diving by using "tag" 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?
okaypol
 
Posts: 10
Joined: Mon Sep 21, 2015 7:23 am

Re: Precise subfolder diving by using "tag" 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.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Precise subfolder diving by using "tag" 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
okaypol
 
Posts: 10
Joined: Mon Sep 21, 2015 7:23 am


Return to Tips & Tricks - DO NOT POST QUESTIONS