Page 1 of 1

Help Request with Hazel Rules Recipe

PostPosted: Sat Jun 04, 2011 7:36 am
by Asteroth
Hi,

I am new to the hole forum posting thing so I want to apologies beforehand if am doing anything wrong.

This is what i want Hazel to do:

Scan "Downloads" folder for folder and or files that contain files with the following extentions:
- ave, mp4, mkv, etc.
- mp3, flac, etc.
- jpg, png, etc.
- pdf, txt
- dmg

I manged this partially for just files, but I could not get hazel to move the hole folder with the file in it. I want this because sometime movies have subtitles with them in folders. So hazel has to recognize stand alone files and folders with media files in them, and then sort them out to the their target folders.

Next I want Hazel to see the difference between a Movie and a TV Show and sort those out to their target folders. I tried to do this with letting haze make the distinction by scanning for the name of the show, for example is the name contains s00e00 in its name its a show. But this didn't work for me.

the idea was that hazel the files and folders out like this:

if the file and or folder has a file extension avi, mp4, mkv etc. then move file and or folder to Movie folder
if the file and or folder has a file extension avi, mp4, mkv etc. and has s00e00 in its name then move file or folder to TV Show folder
if the file and or folder has a file extension mp3, flac etc. then move file and or folder to Music folder
if the file and or folder has a file extension jpg, png, etc. then move file and or folder to Picture folder
if the file and or folder has a file extension pdf, txt, doc, etc. then move the file and or folder to Documents folder
if the file and or folder has a file extension dmg etc. then move file and or folder to Software folder

And at the end I wanted hazel rename and sort the movie and tv shows. For example:
If a movie file and or folder has a name like, The.Dark.Knight.1080p.BBrip.2011, rename that file and or folder to The Dark Knight.

if a tv show file and or folder has a name like The.Big.Bang.Theory.S04E24.HDTV.Xvid-ASAP then rename file to The Big Bang Theory - s04e24

Also I wanted the TV Shows to be sorted as followed:
TV Show/Showname/Season/Episode

So for example out of a downloaded file like The.Big.Bang.Theory.S04E24.HDTV.Xvid-ASAP you get:
TV Show folder then The Big Bang Theory folder then Season 4 folder then The Big Bang Theory - s04e24

I am sorry if am asking an already asked question but I could not find anything on the forum that could help me. Any help with this would be appreciated.

Re: Help Request with Hazel Rules Recipe

PostPosted: Mon Jun 06, 2011 8:12 pm
by Mr_Noodle
If you want Hazel to move the containing folder instead of the file, there's an AppleScript you can use to retarget the rule to the parent folder as described here: viewtopic.php?p=1545#p1545

As for the other issues, I think you have a problem with rule ordering. Please use the rule preview to actually check your rule logic. For instance, your second rule will never match any files because those same files will match the first rule. You need to re-order the rules so that the more specific rule (the 2nd one) is tried first.