Advanced Features

Data Extractors (Dynamic names)

Data extractors are used as actions parameters and can pull, or extract, data out of a file that is being processed by Hygeia. This data can be used when renaming your files, when relocating your files, and even as command line parameters to external applications.


If you are trying to organize your music according to the artist name, you might want to create a rule that matches music files, and then create a ‘move’ action that moves the matching files into C:\Music\<MP3 Artist>. The <MP3 Artist> tag is a data extractor, which means it is being replaced with real data when the action is being executed. In our case the data is the name of the artist. So, when Hygeia discovers the 'Blue Suede Shoes.mp3' file, it immediately moves it to C:\Music\Elvis.

Hygeia exposes many kinds of data extractors such as file name, extension, containing folder, mp3 data and more.


Sometimes you will want to use some kind of a variation of the data that was found by the data extractor. For example, search for a known pattern in the file name and replace it with different text, or maybe use it in order to do something else. Hygeia gives you an option to manipulate values coming from data extractors in order to fit your needs. You can use operators to remove unneeded text, to replace partial text, to find matches using regular expressions and more!


Let’s assume that we are receiving our bills to our e-mail and that the file names of our bills are of a familiar format – <Name>-<Month>-<Year>.pdf, e.g. Electricity-Jul-2011.pdf. It may be useful to organize our bills in the following folder structure: Documents\Bills\<Year>\<Month>. In order to accomplish that, we will define a move action that will move our bills to C:\Documents\Bills\<File Name(RegexMatch,(?<=[a-zA-Z]*\-)[0-9]{4})>\<File Name(RegexMatch,(?<=[a-zA-Z]*\-)[a-zA-Z]+(?=\-[0-9]{4}$))>. This destination path will be resolved to ‘C:\Documents\Bills\2011\Jul\’.

What we actually did was to use the ‘RegexMatch’ operator to find a regular expression match inside the file name. The first time we used it, it was in order to find the year, and the second time it was for finding the month. Learn more about Regular Expressions.

It’s possible to concatenate several operators one after another. The first operator will operate directly on the data coming from the data extractor, the second one will operate on the result of the first operator, and so on. In order to concatenate operators, use a semicolon between them. E.g. <File Name(RegexMatch,(?<=[a-zA-Z]*\-)[0-9]{4};Remove,20)> will be resolved to ‘11’ in the example above. At the first stage the engine will extract the year - 2011, at the second stage it will remove the '20' from it.

Note that operators can be used with all data extractors.