movie+srt question

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

Moderator: Mr_Noodle

movie+srt question Tue Apr 17, 2012 5:39 am • by ignasic
Hi,
I'm quite new with Hazel, and i don't know if my issue has a straight forward answer, sorry about that (and sorry about my spanish english).
I'm dealing with movie files (mp4 and mkv) and subtitles (srt), and what I want to do is: when Hazel finds 2 files with the same name (movie and srt) change the color of the two files to green.
Is it possible? is there any easy answer anyone can show me?
Thank you very much for advance.
ignasic
ignasic
 
Posts: 1
Joined: Tue Apr 17, 2012 5:30 am

Re: movie+srt question Tue Apr 17, 2012 4:51 pm • by Mr_Noodle
Please do not post questions to the Tips forum (there's a sticky article at the top of the forum telling you not to).

As to your question, you probably need to use a script for that. You *might* be able to do it with some funky combination of enclosing folder and subfiles. I haven't tested this so use at your own risk:

Code: Select all
If (all) match (current file)
    If (any) match (current file)
        Extension is mp4
        Extension is mkv
    If (all) match for (enclosing folder)
        If (all) match for (any sub-file)
            Extension is srt


That might match any mp4 or mkv file whose enclosing folder has a srt file in it. I forget if the nested (any subfile) clause is relative to enclosing folder or only applies to the top level current file/folder.

Note also that the src file won't necessarily be at the same level (it could be deeper). You'd need a similar rule swapping the conditions for mp4/mkv with srt. You may need to do a lot of testing and tweaking to get this to work though.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support