Filer icon

Filer's Rule-Making Reference


Rule ConditionsRule ActionsSubstitutions
Common Attribute NamesExample Rules



You will probably find most parts of the Filer pretty self-explanatory, please refer to Filer's User Documentation for more information.

To really get power out of it, you'll want to read the information below, though. There are also a number of useful examples to get you going.

index Rule Conditions

You will need at least one condition for the rule to test for. It can be the type of file, something about its name, how big it is, or some other attribute. These other attributes can be things like someone's nickname kept in a Person file or the e-mail address in the To: field of an e-mail. Note that these can appear on just about any kind of file, but generally will only be found on the kind of file you expect it to be on. A rule will only match if all the conditions you set are met.

index Rule Actions

If the conditions are met, the Filer will perform a series of actions that you choose. Actions can be chained together, such as renaming a file and then moving it to another folder.

Move it to…Move a file to the folder entered in the text field.
Copy it to…Copy a file to the folder entered in the text field.
Rename it to…Rename the file.
Move it to the TrashFor those files which you no longer want.
Delete itOnly if you're sure of yourself and hate a cluttered Trash can.
Terminal command…For experts. Run a command just as if you typed it into a Terminal. Substitutions (see below) are performed before the command is executed. This can make the Filer automatically do all sorts of things it couldn't do otherwise. If you move or rename the file this way, you'll need to do everything else with more Terminal command actions or a shell script.

index Substitutions

You can also substitute certain information about the file into the text box for an action. For example: %TIME% is replaced with the current time before the action is performed. Here are all the possible choices:

%FILENAME%Full name of the file being processed.
%EXTENSION%Just the extension of the file, as in .txt in MyTextFile.txt or .tar.gz in MyArchive.tar.gz.
%BASENAME%File name without extension, like MyTextFile in MyTextFile.txt.
%FOLDER%Full location of the folder which contains the file, like /boot/home/Videos for /boot/home/Videos/HaikuRocks.wmv.
%FULLPATH%Full location of the file, such as /boot/home/config/MyFavoriteSong.mp3. You'll need this for "Terminal Command" actions.
%DATE%Current date in the format MM-DD-YYYY.
%EURODATE%Current date in the format DD-MM-YYYY.
%REVERSEDATE%Current date in the format YYYY-MM-DD. This is often useful for file archives or for pictures.
%TIME%Current time using 24-hour time.
%ATTR:xxxx%An extended attribute of the file. The technical name for the attribute is put between the colon and the second %. At this point, unfortunately, the case-sensitive, technical name of the attribute must be used. For example, an e-mail address attribute is META:email. This can be found in the FileTypes preferences application by choosing the type of file it is normally found on and double-clicking on it in the "Extra attributes" box. In the window that appears, it will be in the box marked "Internal name".

index Common Attributes

Here's a list of some common attibutes. Consult the FileTypes preferences if you look for the attribute name of a specific file type.

Attribute name
E-mail addressMAIL:email
E-mail subjectMAIL:subject
E-mail recipientMAIL:to
E-mail senderMAIL:from
E-Mail spam/genuineMAIL:classification
NicknameMETA:nickname
Street addressMETA:address
MP3 artistAudio:Artist
MP3 albumAudio:Album
MP3 track nameAudio:Title
Program categoryMETA:category

index Example Rules