~~Title: Filter Bar ~~ The filter bar is a small text field that pops up at the bottom of the file display, and makes it easy to quickly filter the current file list. By default you press `*` to display the filter bar, although this key can be modified through the [[:preferences:preferences_categories:filtering_and_sorting:quick_keys|File Displays / Quick Keys]] Preferences page. {{:media:13:filter_bar.png?nolink|}}  The filter bar appears as soon as you press the activation key and you can continue typing immediately to begin filtering the list. ==Filtering the file display== In the above screenshot, we have filtered the `C:\Windows\System32` directory to show all files that end in `.msc`. You can see from the status bar that this resulted in 4,671 items being hidden from the display, leaving only 21 .msc files visible. The filter bar displays these statistics as well, in slightly more detail (it breaks the hidden item count into hidden files and hidden folders). The filter bar affects what is called the "quick filter". This filter is applied on top of the filters set via the [[..:folder_options|Folder Formats]] system, and the global filtering options on the **[[:preferences:preferences_categories:filtering_and_sorting:global_filters|Global Filters]]** Preferences page. It doesn't override these filters - so any files hidden via these other methods will stay hidden no matter what the quick filter is set to. ==Clearing the filter== To clear the filter, press Esc or click the X button on the filter bar. By default the filter bar will disappear automatically when the filter is cleared, but there's an option on the [[:preferences:preferences_categories:filtering_and_sorting:filter_bar|Filter Bar]] Preferences page to keep it open all the time if you prefer. ==Indicating when a quick filter is active== You can configure the file display to display a different background color whenever the quick filter is active, using the File display background settings on the **[[:preferences:preferences_categories:colors_and_fonts:directory_opus_colors|Directory Opus Colors]]** page in Preferences. ==Quickly hiding or showing files and folders== The "file" and "folder" icons on the filter bar that show the file and folder totals are clickable: * Click the first file / folder icons to temporarily **hide** all files / folders. * Click the second file / folder icons to temporarily **show** all files / folders. ==Filter options== {{ :media:13:filter_bar_menu.png?nolink|}}The options button shows a menu that lets you control how the filter is applied: * **Ignore diacritics**: Ignore accent characters when filtering. * **Match any word**: Activates "any word" mode, which works kind of like a search engine. A file will match if it contains any of the words you enter. You can prefix a word with `+`, which means it **must** be present, and `-` which means it **must not** be present. * **Partial matching**: If this is turned on, words you enter only need to match part of a word to be considered a match. For example, searching for "quint" would match "quintuplet". * **Use regular expression**: Lets you specify the search pattern using [[:reference:wildcard_reference:regular_expression_syntax|regular expressions]]. If turned off, the pattern uses the [[:reference:wildcard_reference:pattern_matching_syntax|standard pattern matching syntax]] instead. * **Evaluator**: Lets you use the [[:evaluator|Evaluator]] to perform more complex filtering. Use the **Save as default** command to save the current settings as the defaults. ==Filetype filtering== {{ :media:13:filter_bar_filetypes.png?nolink|}}The filetypes button shows a menu that lets you quickly filter by file extension or filetype group, based on the actual contents of the folder. The top part of the menu refers to filetype groups - in this example, there is one file from the Documents group, five from the Images group, and so on. The bottom part of the menu lists the file extensions that appear in the current folder. Select a group or extension from the menu to quickly filter on that type (you can also select more than one at once). You can display the filetype menu from the keyboard by pressing Shift+F5 when the cursor is on the filter field. ==Show everything== The **Show everything** option provides a quick toggle for the //[[show_everything|Show Everything]]// mode - a way to temporarily disable filters and display all files and folders in the current folder. ==Filtering in Flat View== When the file display you are filtering is in [[..:flat_view|Flat View mode]] the **Filter folders in Flat view** option appears. This lets you control whether the filter applies to folders or only to files. When a folder is filtered out of the display in Flat View mode, all files within that folder (and its sub-folders) are also filtered out. This behavior may or may not be desirable and it can be confusing to have a whole lot of files suddenly disappear unexpectedly, which is which this option is available (and off by default). The default state of this option can be changed by modifying the **flatview_folder_filters** option on the **[[:preferences:preferences_categories:miscellaneous:advanced_options|Miscellaneous / Advanced]]** page in Preferences. ==Evaluator filtering== With the **Evaluator** option turned on, the Filter Bar uses the [[:evaluator|Evaluator]] to evaluate the expression you provide. This can be used in two ways: * A direct evaluation clause can be entered (e.g. `size > 2gb`). * A [[:preferences:preferences_categories:filtering_and_sorting:filters|pre-defined filter]] can be referenced using ? (e.g. `?bigfiles` would use a pre-defined filter called "bigfiles") If the pre-defined filter uses the evaluator as well, the Filter Bar can pass arguments to it. For example, `?bigfiles:5` would pass the value 5 through to the evaluation clause defined in the filter. See [[:evaluator:applicable_contexts:filters_and_find|Evaluator Contexts - Filters and Find]] for more information. ==Using the FAYT for quick filtering== You can also use the [[..:the_lister:find-as-you-type_field|find-as-you-type]] field for quick filtering (although it doesn't have the additional functionality the filter bar does). To do this you need to assign an activation key for the **Filter** mode on the **[[:preferences:preferences_categories:filtering_and_sorting:quick_keys|Quick Keys]]** Preferences page. See the documentation for the find-as-you-type field for more information on this.