file_search
Search for files by name pattern with wildcards, recursively scanning sub-folders to find misplaced files, specific extensions, config files, or audit directories. Returns absolute paths.
Instructions
Search for files on this Windows PC by name pattern (glob/wildcard). Search is performed recursively through all sub-folders. Supports wildcards like *.txt, .jpg, .json, config, report_.xlsx, and other patterns. Use this to find misplaced files, locate all files with a specific extension, discover configuration files, or audit files in a directory. Uses PowerShell Get-ChildItem for fast search performance. Results show the absolute path of each matching file found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | File search pattern (glob pattern). Examples: "*.txt" (all text files), "*.png" (all PNG images), "config*" (files starting with config), "*.log" (all log files) | |
| directory | No | Starting folder for the recursive search. Default: user home directory. Example: C:\Users\rayss\Documents | |
| max_results | No | Maximum number of results to return. Default: 50. Increase if you need more results, decrease to speed up the search. |