.. _custom_file_search:

Advanced search
*********************

The advanced search is more customizable than any of the predefined searches. It can combine different filter patterns with date, size, or even attribute filters.

You can add multiple advanced searches and assign different search criteria to each of them.

You can, for instance, create a custom search for audio files that were are larger than a certain threshold, and another custom search for files with paths that exceed a length of 255 characters.

Each of these searches can be activated and deactivated separately, so you can store a set of custom searches where each serves a different purpose.

The ribbon menu can be used to create, rename, or delete custom searches, or to set up the general parameters of the current search.

.. image:: /images/TreeSize-FileSearch_Custom.png
   :width: 100%
   :align: center

Select Template
=================

This button on the left hand side of the application allows to select from a range of predefined search definitions.

This list serves as an entry point for many different user cases, from which your search definition can be fully customized or extended.

Using the advanced search
=============================

A search configuration for the advanced search consists of one, or multiple search filters, which can be combined freely.

You can, for instance, select whether a file has to match all filters (combine via "And"), or if only at least one of them (combine via "Or") has to match.

Analyze and process search results
======================================

Like in all searches, you can export checked files in the result list to a variety of formats, or you can copy or move them to a position in the file system that you can specify by using the file operation dialog.

Context tab
===============

Start
~~~~~~~~

Starts the file search.

Stop
~~~~~

Stops the file search.

New advanced search
~~~~~~~~~~~~~~~~~~~~~

Creates a new, empty advanced search.

Rename current search
~~~~~~~~~~~~~~~~~~~~~~~~

Allows to set a new name for the current advanced search.

Delete current search
~~~~~~~~~~~~~~~~~~~~~~~~

Deletes the current search and all its filters.

Save current filters as template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Creates a new template from the current search filters and adds it to the list of available templates.

All of the current filters and settings, such as "Include files/folders", are used, if the template is selected.

Customize File Type Groups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Opens the options dialog and navigates to the "File Groups" options page. Here, you can modify the different file groups and which file types they should contain.

Exclude filter
~~~~~~~~~~~~~~~~~

Allows to activate, deactivate or customize the global exclude filters for this search.

Include files/folders
~~~~~~~~~~~~~~~~~~~~~~~~

Determines whether the current search should search for files, folders, or both.

Topmost matches only
~~~~~~~~~~~~~~~~~~~~~~~~

If this option is activated, TreeSize will only show the highest possible level of files and folders as results for a search.

This means, that if a file is found as a search result, but the parent folder is already contained in the list of results, then the file will not be listed. The same applies for subfolders where one of their parent folders is already contained in the list of search results.

.. note::
    
    Activating this option will also activate the option to include folders.

.. toctree::
   :maxdepth: 1

   searchfilter_definition
   availablefiltertypes