Skip to content

Filters

Matt Nadareski edited this page Sep 19, 2025 · 4 revisions

Filters

In general, filters are flexible tools that can be used to narrow down the set of items in a DatFile to an impressive degree. However, without the knowledge of how these filters work, it can be difficult to create a set that do what you intend. Here are a few pointers about filtering that may help you along:

  • Filter expressions will look like --filter=key:value or --filter=!key:value most of the time. Each key is a Field name. Each value will vary on the type of field you are applying the filter to.
  • Filters of the form key:value mean that only items that match this filter will be included in the output
  • Filters of the form !key:value mean that only items that don't match this filter will be included in the output
  • Filters on bool? fields may use true or false as values. The ? just denotes that the value is considered optional internally
  • Filters on double? and long? fields are still of the form key:value or !key:value, with the exception that the value can be prefixed by <, >, or =. By default, values passed in for one of these fields will be treated the same as the = case. Please note that negation still applies, so a filter of the form !key:>value would mean values that are less than or equal would pass.
  • Filters on enum fields usually have a set number of inputs that are accepted and will usually default to an invalid state if the input doesn't match. Please check each Field for a list of acceptable input values.
  • Filters on string fields may use either a direct string match (useful for very specific values) or even C#-Regex statements. For more information about Regex, please see .NET Regular Expressions.

When considering how these filters are used or applied, keep in mind that all features except batch will apply all supplied filters simultaneously, which can sometimes result in nothing to write out. For batch, due to the nature of applying one filter at a time, it can be much more granular, including filtering before or after steps it normally would not occur.

Clone this wiki locally