Query syntax

Type Windows-style Advanced Query Syntax straight into the search field — wildcards, boolean operators, and key:value filters for extension, kind, size, date, contents, author, and tags.

Updated June 21, 2026 · Suggest an edit

What it is. DockDuck’s search field understands a Windows-style Advanced Query Syntax — the same expressions you’d type into Windows Explorer. When to use it. When pointing at chips in the options panel is slower than just typing what you want. Plain words still work exactly as before: anything the parser doesn’t recognize falls back to a case- and diacritic-insensitive match on the file name.

How a query is read

A query is split into tokens on spaces. Quoted text stays together as one token. Tokens are combined with these rules:

  • Tokens are ANDed together by default — every one must match.
  • OR (uppercase) splits the query into alternatives.
  • - before a token, or NOT before it, excludes matches.

So cats OR dogs matches either word, while budget -draft matches budget but not draft.

Note

OR, AND, and NOT must be uppercase to act as operators — lowercase or/and/not are treated as ordinary search words.

Operators & tokens

Every token below is implemented by DockDuck’s query parser.

TokenMeaningExample
*Wildcard — matches any run of characters in the name*.jpg
?Matches exactly one characterreport?
"…"Exact phrase — keeps spaces together as one term"quarterly report"
OREither side matches (must be uppercase)cats OR dogs
ANDBoth must match (implicit; may be written explicitly)invoice AND 2024
NOTExclude the next termbudget NOT draft
-termExclude a term (shorthand for NOT)budget -draft
name:Match the file name onlyname:invoice
ext: / extension: / type:Match by extensionext:pdf
kind:Match by category (see kinds below)kind:image
size:Match by size — comparator, range, or bucketsize:>10mb
date: / modified: / datemodified:Match by modification datedate:thisweek
created: / datecreated:Match by creation datecreated:>2024-01-01
contents: / content:Match the file’s indexed textcontents:invoice
author: / authors:Match the document authorauthor:jane
tag: / tags:Match a Finder tag nametag:red
Note

A key:value token only acts as a filter when the key is one of those above and the value isn’t empty. An unrecognized key — a URL, or a time like 10:30 — is treated as plain search text instead, so it never breaks the query.

Kinds

kind: accepts these categories (plurals and common synonyms work too):

kind: valueMatches
image (picture, photo)Images
audio (music, song, sound)Audio
video (movie)Video
pdfPDF documents
folderFolders
app (application, program)Applications
archive (zip, compressed)Archives
text (txt)Plain text
code (source)Source code
document (doc, docs)Documents

Size

size: accepts three forms. A bare number with no comparator defaults to greater-than-or-equal.

  • Comparators: >, <, >=, <=, = — e.g. size:>10mb, size:<=500kb.
  • Range: low..high — e.g. size:1mb..10mb.
  • Named buckets: empty, tiny, small, medium, large, huge, gigantic — e.g. size:large.

Numbers take an optional unit suffix: b, kb/k, mb/m, gb/g, tb/t (no suffix means bytes).

Dates

date: (and created:) accept relative keywords, ranges, or explicit dates. A bare date with no comparator defaults to on-or-after.

  • Relative: today, yesterday, thisweek (or week), lastweek, thismonth (or month), lastmonth, thisyear (or year), lastyear.
  • Comparators: >, <, >=, <=, = with an explicit date — e.g. modified:>2024-01-01.
  • Range: from..to — e.g. date:2024-01-01..2024-03-31.

Explicit dates parse in yyyy-MM-dd, MM/dd/yyyy, dd/MM/yyyy, or yyyy/MM/dd format.

Worked examples

QueryFinds
*.png kind:image size:>1mbPNG images larger than 1 MB
invoice -draft date:thismonthFiles named invoice, excluding draft, modified this month
"final report" OR "draft report"Either exact phrase
ext:pdf author:janePDFs authored by Jane
kind:video size:large modified:>2024-01-01Large videos modified since the start of 2024
contents:roadmap tag:redFiles whose text contains roadmap and that carry the red tag
Tip

Content matching (contents: and the contents half of a plain term) only finds text Spotlight has indexed. If contents searching seems to miss a file, confirm Search file contents is on in search scopes and that the file’s volume is indexed.

Where to go next

Was this helpful? Suggest an edit