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
Matches any number of characters
*.txt - finds all text files
report*.docx - finds all Word documents starting with "report"
Matches exactly one character
file?.txt - matches file1.txt, fileA.txt
file??.txt - matches file01.txt, fileAB.txt
Exact Matching
Use double quotes for exact phrase matching
"project report" - finds files containing that exact phrase
"quarterly results" - finds files with that exact phrase
Property Filters
File System Properties
Name and Type
Search by filename
name:report - finds files with "report" in the name
Filter by file type
type:document - finds document files
kind:picture - finds image files
kind:music - finds audio files
kind:video - finds video files
Search by file extension
ext:.docx - finds Word documents
ext:.jpg - finds JPEG images
Date Filters
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
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
Search by creation date
datecreated:2023/06/15 - finds files created on June 15, 2023
Search by last access date
dateaccessed:>2024/01/01 - finds files accessed after January 1, 2024
Size Filters
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 bytessize:tiny- 0 to 16 KBsize:small- 16 KB to 1 MBsize:medium- 1 MB to 128 MBsize:large- 128 MB to 1 GBsize:huge- 1 GB to 4 GBsize:gigantic- Greater than 4 GB
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
Search within file contents
content:project - finds files containing the word "project"
content:"quarterly report" - finds files containing that exact phrase
Metadata Properties
Search by document author
author:"John Doe" - finds files authored by John Doe
Other Metadata Properties
title:- Search by document titlesubject:- Search by document subjectkeywords:- 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
Narrows search to include all specified terms
document AND report - finds files containing both "document" and "report"
Expands search to include either term
vacation OR holiday - finds files with either "vacation" or "holiday"
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
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:
- Rebuild search index
- Run Windows Search troubleshooter
- Check indexing settings
- 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"