Advanced Search Icon

Advanced Query Syntax Cheatsheet

A comprehensive guide to Windows search capabilities

Search Icon Introduction

Advanced Query Syntax (AQS) is the default query syntax used by Windows Search to help users define and narrow searches more precisely. This cheatsheet provides a comprehensive overview of Windows search capabilities, syntax, and best practices.

Basic Search Syntax

Wildcards

Asterisk (*)

Matches any number of characters

*.txt - finds all text files
report*.docx - finds all Word documents starting with "report"
Question Mark (?)

Matches exactly one character

file?.txt - matches file1.txt, fileA.txt
file??.txt - matches file01.txt, fileAB.txt

Exact Matching

Double Quotes

Use double quotes for exact phrase matching

"project report" - finds files containing that exact phrase
"quarterly results" - finds files with that exact phrase

File Explorer Icon Property Filters

File System Properties

Name and Type

name:

Search by filename

name:report - finds files with "report" in the name
type: or kind:

Filter by file type

type:document - finds document files
kind:picture - finds image files
kind:music - finds audio files
kind:video - finds video files
ext:

Search by file extension

ext:.docx - finds Word documents
ext:.jpg - finds JPEG images

Date Filters

date:

Search by modification date

date:today - finds files modified today
date:yesterday - finds files modified yesterday
date:thisweek - finds files modified this week
date:lastmonth - finds files modified last month
datemodified:

Search by specific modification date

datemodified:>2024/01/01 - finds files modified after January 1, 2024
datemodified:<2023/12/31 - finds files modified before December 31, 2023
datecreated:

Search by creation date

datecreated:2023/06/15 - finds files created on June 15, 2023
dateaccessed:

Search by last access date

dateaccessed:>2024/01/01 - finds files accessed after January 1, 2024

Size Filters

size:

Filter by file size

size:>10MB - finds files larger than 10 megabytes
size:<500KB - finds files smaller than 500 kilobytes
Predefined Size Ranges
  • size:empty - 0 bytes
  • size:tiny - 0 to 16 KB
  • size:small - 16 KB to 1 MB
  • size:medium - 1 MB to 128 MB
  • size:large - 128 MB to 1 GB
  • size:huge - 1 GB to 4 GB
  • size:gigantic - Greater than 4 GB

Attributes

attributes:

Search based on file system attributes

attributes:hidden - finds hidden files
attributes:system - finds system files
attributes:readonly - finds read-only files

Content and Metadata

Content Search

content:

Search within file contents

content:project - finds files containing the word "project"
content:"quarterly report" - finds files containing that exact phrase

Metadata Properties

author:

Search by document author

author:"John Doe" - finds files authored by John Doe
Other Metadata Properties
  • title: - Search by document title
  • subject: - Search by document subject
  • keywords: - Search by document keywords/tags

Boolean Operators

Key Rules

  • Boolean operators MUST be in ALL UPPERCASE letters
  • Supported operators: AND, OR, NOT
  • Cannot use two keywords (e.g., NOT and OR) in the same query
AND

Narrows search to include all specified terms

document AND report - finds files containing both "document" and "report"
OR

Expands search to include either term

vacation OR holiday - finds files with either "vacation" or "holiday"
NOT

Excludes specific terms from search results

social NOT security - finds files with "social" but excludes "security"

Complex Queries

Combine multiple operators and properties for precise searches

type:document AND author:"John Doe" AND date:thismonth
content:project NOT draft size:>5MB

Advanced Search Techniques

Location-Based Searching

Search within specific folders or drives:

  • Use File Explorer's search box in the specific location you want to search
  • Narrow down search scope using location filters

Indexing Considerations

  • Windows Search uses indexing to speed up searches
  • Indexed locations provide faster search results
  • Configure indexing options through Control Panel > Indexing Options

Search Modes

Classic Mode

Indexes by default:

  • Documents folder
  • Pictures folder
  • Music folder
  • Desktop
Enhanced Mode
  • Indexes entire PC
  • Includes all user folders and files
  • More comprehensive search coverage

Keyboard Shortcuts

Windows + S
Open Search home
Ctrl + F
Search within Windows Explorer
Windows + I
Open Settings search
Windows + F
Search files and folders

Tips and Best Practices

Search Optimization

Organize Files Properly

  • Create logical folder structures
  • Use consistent naming conventions
  • Maintain well-organized file systems

Refine Search Queries

  • Use precise search syntax
  • Utilize search filters
  • Leverage advanced search operators

Indexing Improvements

  • Customize indexed locations
  • Rebuild search index periodically
  • Enable cloud content search
  • Run Search and Indexing troubleshooter

Troubleshooting

If search is slow or ineffective:

  1. Rebuild search index
  2. Run Windows Search troubleshooter
  3. Check indexing settings
  4. Verify file system health

Limitations

  • Some file types may not support full content searching
  • Network drive searches are performed in real-time, which can be slower
  • Some common words are ignored during searches:
    • Ignored words: the, and, in, is, a, of, I
    • Ignored symbols: £, $, %, #, @
  • Wildcard support varies between filename searches and content searches

Examples of Complex Queries

Find all PDF documents modified in the last week that contain "budget"

type:pdf date:lastweek content:budget

Find all large image files

kind:picture size:large

Find all documents created by a specific author this month

type:document author:"John Smith" date:thismonth

Find all Excel files with "financial" in the content but not "draft"

ext:.xlsx content:financial NOT draft

Find all presentations larger than 5MB

type:presentation size:>5MB

Find all hidden system files

attributes:hidden attributes:system

Find all video files accessed in the last 30 days

kind:video dateaccessed:last30days

Find all text files with specific content

ext:.txt content:"important note"