An important part of a file pattern is its rules. Rules are a set of conditions which are responsible for filtering the files or folders that will be handled by Hygeia. The Rules mechanism is designed with a basic concept of 'Write what you want... in English' which allows you to define both simple and complex filters very easily. For example, you can write down a simple rule that looks like: “File name contains hello”. This rule will match all of the files that contain the word ‘hello’ in their name. You can have a bit more complex rule set: "File name contains hello AND File name contains world", which will obviously accept all files that contains both 'hello' and 'world' in their name.
What rules can i use?
The ‘Kind’ rule filters files according to their type. This rule lets you choose from the following predefined types:
- Any – matches any file or folder
- Music – matches music files such as mp3, wma, etc.
- Photo – matches image files such as jpg, gif, etc.
- Video – matches video files such as avi, mkv, etc.
- Subtitle – matches subtitle files such as sub, srt, etc.
- Documents – matches document files such as pdf, doc, docx, etc.
- Shortcuts – matches windows shortcuts
File name, Extension
Filters files according to their name and extension by using the ‘File name’ and ‘Extension’ rules respectively. You can have the rule filter files by the following conditions when the file name or extension:
- Are/aren’t equal to some value
- Contain/do not contain some value
- Start/do not start with the some value
- Ends/do not end with the some value
- Match a regular expression
Creation Date, Access date, Modification data
Filters files and folders based on their date properties - creation, access and modification. These rules enable you to filter files if their creation/access/modification dates are:
- Equal/not equal to some date
- Before some date
- After some date
- In/not in the last hours/days/weeks/years
Filters files according to their size in Bytes/KB/MB/GB.
Filters files based on their attributes. You can filter hidden/read only/archive/compressed files. Choose if these properties are required, allowed or not allowed in order for the rule to accept them.
MP3 title, MP3 artist, MP3 album, MP3 comment, MP3 year, MP3 track
Filter files according to their MP3 data. You can have the rule filter your music files based on their title, performing artist, album, comment, publish date and the track number as long as it’s available of course. In case the rule is applied to a file which is not an mp3 file the rule will not accept it.
Exif date, Exif camera maker, Exif camera model
Use these rules for images in case you want to check when the picture was taken, who the manufacturer of the camera is and even what the model of the camera that was used to take the picture is.
Last handling date
This rule can prevent Hygeia from handling a file which was already handled before. If the file was handled, you can also filter by the date it was handled.