File Search
The File Search tab provides a powerful, multi-criteria search across one or more SharePoint Online sites. It uses SharePoint's built-in KQL (Keyword Query Language) Search API for fast server-side filtering, and optionally applies a client-side regex filter for fine-grained matching.
How It Works
- The tool builds a KQL query from the filters you specify.
- The query is sent to the SharePoint Search REST API.
- Results are fetched in pages (auto-pagination) until all matching items are retrieved or the Max results limit is reached.
- If a Name regex is specified, a client-side regex filter is applied to the fetched results.
- Results are displayed in the UI and exported on demand.
⚠️ Note: SharePoint Search only indexes content that the crawl has processed. Newly uploaded files may not appear in results for up to 15–60 minutes depending on crawl schedules.
Filters
File Extensions
Enter one or more file extensions separated by spaces (no dots required):
docx pdf xlsx pptx
The tool translates this into KQL FileType clauses:
FileType:docx OR FileType:pdf OR FileType:xlsx OR FileType:pptx
Leave blank to search all file types.
Name / Regex
| Mode | Behavior |
|---|---|
| Plain text | Passed to KQL as a Title: contains filter |
| Regex | Applied client-side after the API response is received |
Regex examples:
| Pattern | Matches |
|---|---|
^Budget_202[34] | Files starting with Budget_2023 or Budget_2024 |
\.(bak|tmp)$ | Files ending with .bak or .tmp |
(?i)invoice | Files containing "invoice" (case-insensitive) |
Date Filters
| Filter | KQL property |
|---|---|
| Created after | Created>={date} |
| Created before | Created<={date} |
| Modified after | LastModifiedTime>={date} |
| Modified before | LastModifiedTime<={date} |
Author Filters
| Filter | KQL property |
|---|---|
| Created by | Author:{loginName or display name} |
| Modified by | Editor:{loginName or display name} |
Library Path
Restrict the search to a specific library or folder using the Path: operator (prefix match):
/sites/HR/Shared Documents/Policies
Max Results
| Value | Behavior |
|---|---|
| 10 – 50,000 | Maximum number of results to fetch (auto-paginated) |
⚠️ Note: Fetching large result sets (e.g., 50,000 items) takes time and may trigger SharePoint throttling. Use specific filters to narrow your query before raising the limit.
Version History Exclusion
SharePoint Search may index historical versions of files. These appear as paths containing /_vti_history/. SharePoint ToolBox automatically excludes these paths from results, ensuring that only the current (live) version of each file is returned.
Auto-Pagination
SharePoint's Search API returns a maximum of 500 items per request. The tool automatically issues additional requests, incrementing the start row, until all matching results have been fetched or the Max results limit is reached. No manual intervention is required.
Example Queries
Find all PDF files modified in 2024
- Extensions:
pdf - Modified after:
2024-01-01 - Modified before:
2024-12-31
Find files created by a specific user this month
- Created after:
2025-03-01 - Created by:
jane@contoso.com
Find all Excel files with "Budget" in the name, in a specific library
- Extensions:
xlsx - Name (regex):
(?i)budget - Library path:
/sites/Finance/Shared Documents/Annual Reports
Output Formats
CSV
Semicolon-delimited, UTF-8 with BOM. Filename: FileSearch_<YYYYMMDD>.csv
Columns: Title, Path, FileType, Author, Editor, Created, LastModified, Size
HTML
Self-contained interactive file with real-time filter and sortable columns. Filename: FileSearch_<YYYYMMDD>.html
Tips
- Use the Library path filter to scope searches to a known folder.
- If you expect fewer than 500 results, set Max results to 500 to avoid unnecessary pagination overhead.
- The Created by filter accepts display names or UPNs. If the display name contains spaces, the tool handles quoting automatically.
See Also
- Duplicate Detection — Find redundant files across the site
- Connection and Profiles — Multi-site search setup
- Output Files — File naming conventions