# Editing filters

## The Filters window

You can edit filters in the "Filters" window, accessible from the GrandPerspective menu. GrandPerspective comes with a few default filters. You can create your own filters using the New button, or modify existing filters using the Edit button. In both cases, a new "Filter" window will appear where you can edit the filter. Filters that you create or modify are maintained in the filter repository, which is automatically stored in your preferences. That way they are available next time you run GrandPerspective.

You can remove filters that you created, using the Remove button. You can also use this button to undo changes you have made to the default application-provided filters. The filter will then be replaced by the original filter with this name.

## The Filter window

Configuring a specific filter is done in a "Filter" window. The window contains two lists. The list at the left shows the tests that are to be used in the filter. The list at the right shows all tests that are still available. You can select tests that should be used by moving them from the right to the left, using the < button.

When there is more than one test in the filter, a file or folder only needs to match one for the filter to apply. In other words, the tests are combined using "OR" as opposed to "AND".

An icon to the left of each test in the filter indicates if the test is inverted or not. A green checkmark indicates that the filter applies to items that pass the test. A red cross indicates that the filter applies to items that do not pass the test. You can toggle between both states by double-clicking on the test. Some tests cannot be toggled, however. This holds for tests for which there is only one sensible state. An example are tests that apply to folders; these tests are always inverted. If they were not, a file would only be shown when all folders in its path (starting from the folder that was scanned) match one or more of these folder-tests. In practice, this will never (or very rarely) be the case, resulting in empty views.

GrandPerspective comes with a few default filter tests. You can create your own tests using the New button, or modify existing tests using the Edit button. In both cases, a new "Filter test" window will appear where you can edit the test. Tests that you create or modify are maintained in the filter test repository, which is automatically stored in your preferences. That way they are available next time you run GrandPerspective.

You can remove tests that you created, using the Remove button. You can also use this button to undo changes you have made to the default application-provided tests. The test will then be replaced by the original test with this name.

## See also

- Editing filter tests