Hazel recognizes the following attributes:
The name of the file (or folder), without any extension. So, if you have a file called example.jpg , this attribute matches against example .
The file’s extension, which is the part of the file name after the last dot (.). The file example.jpg has the extension jpg . (By default, extensions are hidden in the Finder, but Hazel matches them regardless of whether they’re visible. To toggle the visibility of extensions in the Finder, go to Finder > “Preferences” > “Advanced” and select or deselect “Show all filename extensions.”)
The full name of the file (or folder)—that is, the name plus the extension.
Date Last Modified
Date Last Opened
Date Last Matched
Note: When using any of the above “Date” attributes with “occurs before” or “occurs after,” or the “Current Time” attribute, keep in mind that Hazel treats each day as starting or ending at midnight. So, if you set up a condition like “current time is after 10 PM on weekdays,” the condition matches only from 10 PM until midnight each weekday—Hazel does not consider 12:01 AM the following morning to be “after” 10 PM.
The type of file, such as a document, movie, or folder. With second pop-up menu set to “is” or “is not,” choose “Other” from the third pop-up menu to display a list of all available file types on your Mac.
Any tag that can be assigned in the Finder. When the second pop-up menu is set to “contains tags” or “does not contain tags,” clicking in the field that appears displays a list of all currently defined Finder tags (click Show All to display all tags if the list is long). If the second pop-up menu is set to “contain” or “do not contain,” you can enter any freeform text in the field.
The color label, if any, applied to the file. This will match any of the tags which are currently associated with that color.
Freeform notes associated with a file or folder. You can see and edit these comments in the Finder by selecting the file or folder and choosing File > “Get Info.”
The size of the file. Because of the way macOS calculates sizes, this figure (the actual size) may be less than the amount of space the file occupies on disk.
The text content of the file. If the second pop-up menu is set to “contain” or “do not contain,” you can match any words that Spotlight has indexed for this file. That is, if you can find the file via Spotlight using a certain word, Hazel can also match that word in the file’s contents.
The URL or email address the file came from. Note that only certain apps, such as Safari and Mail, store this information.
The number of subfolders in the folder, starting from the folder being monitored. This is useful only if you have a rule set up to descend into subfolders using the “Run rules on folder contents” action (see ). A subfolder depth of 0 indicates the folder being monitored.
How many files and folders are contained by the item being matched by the rule (preferably a folder). This counts the number of items at the top level of the monitored folder, not those contained in subfolders. If the current item being processed is a file, this number is 0. (This is similar to Spotlight’s Number of Items attribute except that this does not include hidden files in the count.)
This attribute matches all files (and folders). This is useful when the final rule for a given folder is a “catch-all” rule that applies to any files or folders that don’t match any of the previous rules—but it makes sense only when it is the sole condition in a rule.
Passes shell script
This attribute allows you to select any Spotlight attribute, of which macOS may have dozens or hundreds (depending on which apps you have installed).