Find Files With Everything
Use es.exe as a read-only client for the running Everything index. Minimize tool calls and returned text.
Route the search
- Use
Test-PathorGet-Itemfor an exact known path. - Use
rg --filesfor filenames inside a known workspace andrgfor content in a known tree. - Use Everything first when the location is unknown, outside the workspace, computer-wide, or based on indexed metadata.
Run an efficient query
-
Check availability at most once per session, or after a failed query:
Get-Command es.exe -ErrorAction SilentlyContinueOtherwise, run the search directly. If ES is missing or returns IPC error 8, use a narrowly scoped fallback. Do not install, start, or repair software unless the user asks.
-
Narrow the query before increasing output:
es.exe -n 20 "report" es.exe -path "C:\Work" /a-d -n 20 "ext:xlsx" es.exe -size -dm -n 20 "size:>1gb"Use
/adfor folders,/a-dfor files,-pathfor a subtree, and Everything search terms such asext:,size:,dm:, anddc:. Quote paths and terms containing spaces. -
When invoking from PowerShell 7 or later, put
-argvfirst. Omit it in Windows PowerShell 5.1 and other shells. -
Return plain paths by default. Use
-jsonand extra columns only when structured metadata is required. Use-get-result-countonly when the count matters or a capped query needs refinement. -
Keep the default cap at 20. If the cap is reached, refine the query before requesting more results. Do not export results to a file unless asked.
Report the result
- Return the smallest sufficient set of exact paths and summarize omitted matches.
- State the query or scope when no result is found.
- Treat a zero-result search as evidence about the current Everything index, not proof that an unindexed location is empty.
- Avoid
content:for a known project tree; it is not indexed by default and is usually less efficient thanrg.
Keep searches read-only
Do not use ES state-changing options such as -exit, -reindex, -save-db, run-count setters, or saved-setting changes. Do not delete, move, copy, or open results unless the user separately requests that action.