File Selection Language

Author: Kristian Ovaska (kristian.ovaska [at]
License: BSD
Version: 0.5.2 (2007-03-05)
Requirements: Python 2.3 or greater
Platforms: Unix, Windows

File Selection Language (FSL) is a descriptive language for file selection. It is used to selectively pick files from a directory structure. FSL is useful for selective backups, for instance. FSL uses glob patterns as the basic building block. For fine-tuning the selection, inclusion/exclusion rule combinations and conditional expressions are available. File size and modification date can be used in expressions.

Report bugs, send suggestions and give feedback to the author.

See documentation:


Version File Size MD5
FSL 0.5 72 KB 2d5888b27f66889ceb99732ca798243c
FSL 0.5.1 72 KB cc7703e15fcda7bb9e3cf92da9b84c8f
FSL 0.5.2 75 KB fff85cac5969d76b58eb6d14a14c4ed5


IN home
    *.gif, *.jpg, *.png
    IN alfred
        EACH f IN *.ps, *.eps IF age(f) < 365
        *.pdf NONREC   # non-recursive

NOT usr/local/*.sh

NOT EACH f IN a* IF size(f) > 1000000 OR extract(date(f), "year") = 2001

This example program:


FSL can be used with a command line tool (fsltool) or, for Python programmers, with a programmable interface. For the Python interface, see the documentation of

Several FSL rule files can be combined in a cascading manner similar to CSS. The effect is the same as if the rule files were pasted into a single file.

Support for both Windows-like and Unix-like paths.

Strict parse-time type checking to catch as many errors as possible before run-time. For example, you can't say EACH f IF size(5) > 1000 because function size expects filename argument.


  1. Download FSL
  2. Unpack the archive
  3. Install FSL:
  4. Test that the installation works by executing under fsl/test/. The tests take some time to finish. Expected result: one test fails (test_lexer.TestLexer.test_invalid), all others pass. If you get this result, you can assume the program is installed correctly. If more tests fail, try to see if there is something obviously wrong with the installation or environment; if not, contact the author.
  5. Next, you can start playing with fsltool (fsl/

Updated 2007-03-05