Find Files Extension
A Visual Studio Code extension that allows you to search for files by pattern with case-insensitive search and display clickable results in a clean, minimal format.
Features
- Case-Insensitive Search: All searches ignore case by default (e.g.,
*.CONFIG matches app.config)
- Quick File Search: Search for files using glob patterns (e.g.,
*.ts, *.json, config*)
- Clickable Results: All file paths in results are clickable - use Ctrl+Click to open files directly
- Minimal Clean Output: Results displayed as simple list of file URLs, one per line
- Easy Counting: Number of lines = number of files found
- Workspace Integration: Searches within your currently opened workspace
- Smart Exclusions: Automatically excludes
node_modules, bin, and obj directories
- No Result Limits: Returns ALL matching files (use specific patterns to avoid performance issues)
Usage
Basic Usage
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Type "Find Files" and select the command
- Enter your search pattern in the input box
- View results in the new document that opens
- Ctrl+Click any file path to open that file
Search Pattern Examples (All Case-Insensitive)
| Pattern |
Description |
*.* |
All files |
*.ts |
All TypeScript files (matches .TS, .Ts, etc.) |
*.json |
All JSON files (matches .JSON, .Json, etc.) |
package* |
Files starting with "package" (matches PACKAGE.json, Package.lock, etc.) |
*config* |
Files containing "config" (matches CONFIG.js, MyConfig.xml, etc.) |
**/*.test.* |
All test files in any subdirectory |
src/**/*.ts |
All TypeScript files in src directory |
*README* |
All README files (matches readme.md, README.TXT, etc.) |
The extension outputs a clean, minimal list:
file:///d:/project/package.json
file:///d:/project/src/config.ts
file:///d:/project/docs/README.md
- Each line is a clickable file URL
- No headers, footers, or extra formatting
- Line count equals file count found
- Sorted alphabetically (case-insensitive) for easy browsing
Important Notes
File Access Permissions
On Windows, some system files or files in protected directories may not be found unless VS Code is running with administrator privileges. If you're searching for files in system directories or experiencing missing results, try:
- Close VS Code
- Right-click on VS Code and select "Run as administrator"
- Re-open your workspace and try the search again
This is due to Windows file system security and affects VS Code's ability to enumerate files in protected locations.
⚠️ Warning: This extension has NO result limits and will return ALL matching files. In large workspaces:
- Broad patterns like
*.* may return thousands of files
- Very large result sets can make VS Code unresponsive
- Consider using specific patterns (e.g.,
*.config instead of *.*)
- The search may take longer in workspaces with many files
Use responsibly and start with specific patterns before trying broader searches.
Installation
From Source
- Clone or download this repository
- Open the folder in VS Code
- Run
npm install to install dependencies
- Press
F5 to launch a new Extension Development Host window
- Test the extension in the new window
Building
npm install
npm run compile
Development
Prerequisites
- Node.js (16.x or later)
- Visual Studio Code
- TypeScript
File Structure
find-files/
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── src/
│ └── extension.ts # Main extension code
└── README.md # This file
Key Components
Command Registration
The extension registers a single command findFiles.search that can be triggered from the Command Palette.
File Search
Uses VS Code's vscode.workspace.findFiles() API to search for files matching the user's pattern.
Results Display
Creates a new untitled document with formatted results including:
- Search metadata (pattern, count, timestamp)
- Clickable file paths using
file:// protocol
- Relative paths for better readability
Configuration
Currently, the extension uses these default settings:
- Excludes
node_modules, bin, and obj directories
- No limit on number of results (searches all matching files)
- Sorts results alphabetically (case-insensitive)
Troubleshooting
No Results Found
- Ensure you have a workspace folder open
- Check that your search pattern is correct
- Try broader patterns like
*.* or **/*
Files Not Opening on Click
- Make sure to use Ctrl+Click (or Cmd+Click on Mac)
- Verify the file paths are displayed as links (should be clickable)
- No Result Limit: The extension returns ALL matching files, which can be thousands in large workspaces
- Large workspaces may take longer to search and display results
- Very broad patterns like
*.* or **/* may cause VS Code to become unresponsive
- Consider using more specific patterns to narrow results (e.g.,
*.ts instead of *.*)
- For massive result sets, VS Code may struggle to render the output document
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This extension is provided as-is for educational and practical use.
Changelog
1.0.9
- Improved: Case-insensitive sorting of results for better organization
- Enhanced: Files now sort properly regardless of case (e.g., "App.config" and "app.js" sort naturally)
1.0.8
- Removed: File result limits - extension now returns ALL matching files
- Warning: Added performance warnings and documentation about unlimited results
- Enhanced: Better exclusion patterns for build directories
1.0.7
- Fixed: Added documentation about file permission requirements
- Improved: Cleaned up debug code for production release
1.1.0
- New: Case-insensitive search functionality - all searches now ignore case
- Improved: Simplified output format - just clickable file URLs, one per line
- Enhanced: Better pattern matching for filenames and paths
- Streamlined: No headers or extra formatting in results for cleaner output
1.0.0
- Initial release
- Basic file search functionality
- Clickable file results
- Clean result formatting
- Progress indicators
- Error handling