Run only on single file being added to a subfolder [SOLVED]

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

Moderator: Mr_Noodle

Hello,

I find Hazel extremely difficult to figure out, perhaps I'm trying to do something it can't do. But I'm assuming it can with the right rules logic.

What I'm trying to accomplish
I have a TVSHOWS folder within it TVshows (IE: Breaking Bad)
In each TVshow folder, there are Season folders (Season 01, Season 02, etc..)
When a .srt file is added for an episode I need Hazel to run a shell script (forwarding the file+path to a python script that will clean up the .srt file)

Based on the support document I currently have;
"ON CHANGE"
Same as here: https://www.noodlesoft.com/manual/hazel ... ubfolders/

Then the set of rules in "CLEAN SUBS"
(for testing) display a notification if the file extension contains 'srt'



Problem with the above is that it does run on the file I add but then also does ALL other .srt files in the entire TVSHOWS folder even though I only add a single .srt file to one specific Season folder.

Any help is greatly appreciated, I'v already wasted 2 hours of my life on this.
Last edited by K1TSUNE on Wed Jan 17, 2018 2:45 pm, edited 1 time in total.
K1TSUNE
 
Posts: 4
Joined: Thu Jan 11, 2018 8:49 pm

Can you post your rule to process .srt files?
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

So like I said it uses the subfolder code from support doc:
Image

Rules for finding any .srt in an updated/changed folder:
Image

Folder structure example:
    TVSHOWS
      Mr. Robot
        Season 01
        Season 02
        Season 03
      Shut Eye
        Season 01
        Season 02
K1TSUNE
 
Posts: 4
Joined: Thu Jan 11, 2018 8:49 pm

So again what I'm trying to accomplish is when is say when a .srt file gets added to a Season folder, it will run the rules on just that file, or if that's not possible, just that single folder that has been updated ("date modified?")
K1TSUNE
 
Posts: 4
Joined: Thu Jan 11, 2018 8:49 pm

If you only want to have the rule match the first time the file is added, try adding a condition like "Date added is after date last matched".
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

That date match rule is a good addition.

It seems though that I just had to first let it "notify" each and every single match.

From that point on it not notifies (runs the rules) whenever I add a .srt file, instead of (what it seemed to be doing) running it on any .srt file.

So it wasnt until I let it run for a good time that it is now where it'll just work on a each new file.
K1TSUNE
 
Posts: 4
Joined: Thu Jan 11, 2018 8:49 pm


Return to Support