Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Filters

Filters determine which files or directories are processed by a rule. They are specified in the filters section of a rule.

Available filters

filterdescription
nameMatch by filename (glob or regex)
extensionMatch by file extension
file_sizeMatch by file size
file_typeMatch by type (file, directory, symlink)
date_modifiedMatch by modification time
date_accessedMatch by access time
date_createdMatch by creation time
date_changedMatch by metadata change time
mime_typeMatch by MIME type

Filter logic

Filters are AND’d together by default. Use any: for OR logic and not: for negation.

# All filters must match (AND)
filters:
  - extension: pdf
  - date_modified:
      before:
        days_ago: 30

# At least one must match (OR)
filters:
  - any:
      - file_size: "> 100mb"
      - date_modified:
          before:
            days_ago: 30

# None must match (NOT)
filters:
  - not:
      - name: "*.tmp"
operatorbehavior
(default)All filters must match (AND)
any:At least one child must match (OR)
not:None of the children must match

Both any: and not: can be nested for complex boolean expressions.

Examples

Match all files (not directories)

filters:
  - file_type: file

Match specific file types

filters:
  - extension: [jpg, png, gif]

Match files by name pattern

filters:
  - name: "Screenshot*"

Match large files

filters:
  - file_size: "> 100mb"

Match old files

filters:
  - date_modified:
      before:
        days_ago: 30

Match old or large files (OR)

filters:
  - any:
      - file_size: "> 100mb"
      - date_modified:
          before:
            days_ago: 30

Match old PDFs (AND)

filters:
  - extension: pdf
  - date_modified:
      before:
        days_ago: 30

Exclude temp files (NOT)

filters:
  - not:
      - extension: [tmp, temp, bak]

Complex: (old OR large) AND documents AND NOT backup

filters:
  - any:
      - file_size: "> 100mb"
      - date_modified:
          before:
            days_ago: 90
  - extension: [pdf, doc, docx]
  - not:
      - name: "*_backup*"