Preview mode
Hazel has a preview mode that will show what files will match which rules. It's "eye" button located to the left the gear/cog menu button. Note that it only previews whether a rule matches. It does not make any predictions on whether the rule executes successfully. So, for instance, if you have a rule matching PDF files and the action is to copy to another drive, the preview would indicate a successful match but will not indicate anything about whether the copy operation would fail or not (like if the drive is currently off-line). Nonetheless, previewing should be quite helpful in working out the logic of your rules.
You can also look at the attributes for each file. Select a file in the preview and click the "i" button. This will show you all the attributes for the file. If a file matches a rule, the fields which were part of the match are highlighted. You can also see the values of any custom attributes that matched at the bottom of the list.
Double-checking rules
Many times, Hazel is doing exactly what you tell it to do but you may have a different interpretation of the rules.
Some things to double-check:
- Make sure you have the "Any/All/None" pop-up set correctly.
- Remember that rules are processed in order.
- Remember that Hazel only applies the first rule that matches (this is different than how rules work in Mail).
Checking the logs
Go to the "Info" tab in Hazel and click the "View Log" button. This will show a log of what Hazel has been doing. You can use the search field to look for particular files. Also, you can also bring up the log via the menubar icon.
If you want more in-depth logging, you can enable debug mode as described here: http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=296
Seeing what Hazel (and Spotlight) sees
A good way to see what Hazel (and Spotlight) sees in a file is to use the "mdls" command. You will need to use Terminal so if you are uncomfortable with that then you may want to skip this.
- Launch Terminal.
- Type in "mdls " (note that you don't type in the quotes and that there is a space after the command).
- Drag the file you want to check into the Terminal window and drop it.
- Press the return key.
- You should get a print out of all the fields that Spotlight sees for this file.