Search Syntax

<< Click to Display Table of Contents >>

Navigation:  Using the TreeSize File Search > Basic Search >

Search Syntax

TreeSize provides a syntax that allows you to customize your search quickly and flexibly. Besides file names, certain keywords offer the possibility to search for file extensions, file groups or file contents. Search terms can be combined via 'AND' or 'OR' and file names can be excluded from the search using the syntax. It is also possible to use wildcards and regular expressions. Below you will find a description of the permitted keywords and some use cases. For most keywords, there is a abbreviated form for faster search entry.

 

The search syntax is structured as follows:

<Property> <Operator> <Value>

for example

name: = readme

finds all files whose name (property) matches (operator) the word readme (value).

Several search terms can be combined:

name:=readme OR name:=movie

finds all files with 'readme' OR 'movie' in their name.

The following table shows all available properties, operators and conjunctions that you can use in TreeSize.

Information: When searching for file names, name: can be omitted. Regardless of this, the = character can generally be omitted as an operator. This property and this operator are the default values used in the search. There are abbreviated notations for individual properties, which can be found in the table below.

Property:

Description:


Example:

Abbreviated form:

Explanation:

name:

Search by file name.
This is the default property that is used when no property is explicitly specified.


name:=readme

readme

Search for all files whose file name contains the word 'readme'.

path:

Search by folder path.


path:=Windows

-

Search for all files and folders in the Windows folder.

extension:

Search by file extension.


extension:=txt

ext:txt

Search for all files with the file extension 'txt'.

group:

Search by file group.


group:=Video Files

group:Video Files

Search for all video files.
Information: The available file groups can be adjusted under 'Options > Configure file groups.

content:

Search by file content.


content:=license

cont:license

Full text search for all files, in whose file content the word 'license' occurs.
Information: The full text search is time consuming. It is therefore recommended to use additional search criteria.

size:

Search by file size.


size:<500MB

size:>5MB

-

Search all files smaller than 500 MB.

Search all files bigger than 5 MB.
Information: The search only refers to file sizes, folder sizes are not taken into account.

accessed:

Search by access date.


accessed:<=11/01/2021

accessed:>11/01/2021

accessed:03/15/2020-11/15/2021

-

Search for files with access date in the specified time interval. Instead of an explicit time interval, the maximum or minimum date can also be specified.

created:

Search by creation date.


created:<=11/01/2021

created:>11/01/2021

created:03/15/2020-11/15/2021

-

Search for files with creation date in the specified time interval. Instead of an explicit time interval, the maximum or minimum date can also be specified.

modified:

Search by modification date.


modified:<=11/01/2021

modified:>11/01/2021

modified:03/15/2020-11/15/2021

-

Search for files with modification date in the specified time interval. Instead of an explicit time interval, the maximum or minimum date can also be specified.

 

Operator:

Description:


Example:

Abbreviated form:

Explanation:

=

The property must apply.
This is the default operator that is used if no operator is explicitly specified.


name:=readme

readme

Search for all files whose file name contains the word 'readme'.

!=

The property must not apply.


name:!=readme

!=readme

Search for all files that do not contain the word 'readme'.

~

Can be used in conjunction with the name:property. The following value is a Regular Expression (Regex) and must apply the property.


name:~[0-9]

~[0-9]

Search for all files that have at least one digit in their name.

!~

Can be used in conjunction with the name:property. The following value is a Regular Expression (Regex) and must not apply to the property.


name:!~[0-9]

!~[0-9]

Search for all files that have no digits in their names.

> or >=

Operator for size or date comparisons:

The property must be greater than (greater than or equal to) the specified value.


size:>=5MB

-

Search for all files that are bigger than or equal to 5 MB.
Information: The search only refers to file sizes, folder sizes are not taken into account.

< or <=

Operator for size or date comparisons:

The property must be smaller than (smaller than or equal to) the specified value.


size:<=500MB

-

Search for all files that are less than or equal to 500 MB.
Information: The search only refers to file sizes, folder sizes are not taken into account.

 

Conjunction:

Description:


Example:

Abbreviated form:

Explanation:

AND

The conjunct search patterns must all match.
This is the default connection that is used if no connection is explicitly specified.


name:=readme AND extension:=txt

readme ext:txt

Search for all files whose file name contains the word 'readme' and which have the file extension 'txt'.

OR

At least one of the related search patterns must match.


name:=readme OR name:=movie

readme OR movie

Search for all files whose file name contains the word 'readme' or 'movie'.

 

When specifying values, more previsely the actual search pattern, there are various reserved characters such as wildcards or quotation marks for exact searches. The following table lists these characters and explains them using some examples.

Example value:

Description:


Example:

Abbreviated form:

Results:

*readme*

Search for readme, where any number of characters can be placed before and after the word. The word contains 'readme'.


name:=*readme*

*readme*

Finds: '123readme.txt', '123readme.docx'

but NOT: 'read_me.txt', 'reading.docx'

readme

Corresponds *readme*. The two wildcards before and after the word can be omitted for simplicity.


name:=readme

readme

Finds:: '123readme.txt', '123readme.docx'

but NOT: 'read_me.txt', 'reading.docx'

readme*

Search for readme, where any number of characters can be placed after the word, but no characters are allowed before the word. The word begins with 'readme'.


name:=readme*

readme*

Finds: 'readme.txt', 'readme_c.docx'

but NOT: '123readme.txt', 'read_me.txt'

*readme

Search for readme, where any number of characters can be placed before the word, but no characters are allowed after that. The word ends with 'readme'.


name:=*readme

*readme

Finds: '123readme', 'c_readme'

but NOT: 'readme.txt', 'readme_c'

"readme"

Exact search for the word 'readme'. No characters are allowed before and after.


name:="readme"

"readme"

Finds: 'readme'

but NOT: 'readme.txt', '123readme'

rea?me

Search for file names beginning with 'rea' and ending with 'me' and containing exactly one character in between.


name:=rea?me

rea?me

Finds: 'readme', 'reasme', 'rea1me'

but NOT: 'rea123me', 'readme.txt'

\*readme*

Search for files that contain the term "readme" anywhere in their path.


name:=\*readme*

\*readme*

Finds: "readme.txt" in any folder, "abc.doc" in "C:\temp\readme\local".

but NOT: "abc.doc" in "C:\temp\local".

xt ein.