An efficient file search tool based on Electron, featuring smart search algorithms and a user-friendly interface.
- Scope Narrowing: Prioritizes subdirectories when matches are found in a directory.
- Parallel Processing: Searches up to 3 subdirectories in parallel to fully utilize multi-core CPUs.
- Batch Operations: Batches file info retrieval and result sending to reduce IPC overhead.
- Avoid Duplicate Scanning: Automatically records scanned files to prevent redundant searches.
- Depth-First Strategy: Prioritizes diving deeper into relevant directories upon finding matches.
- Images: jpg, png, gif, svg, webp, etc.
- Documents: pdf, doc, docx, txt, xlsx, ppt, etc.
- Videos: mp4, avi, mkv, mov, etc.
- Audio: mp3, wav, flac, aac, etc.
- Archives: zip, rar, 7z, tar, etc.
- Open Folder: Quickly open the file's directory in the system explorer.
- View File: Open the file directly.
- Properties: View detailed file information (size, creation time, modification time, etc.).
- Keyword Highlighting: Automatically highlights matched keywords in search results.
- Clear Results: One-click clearing of all search results.
- Number of files found
- Number of files scanned
- Search duration
- Search progress animation
Install Dependencies
npm installStart Program
npm startInstall Builder
npm install --save-dev electron-builderBuild for Windows
npm run build:winThis generates:
- Installer:
dist/文件搜索工具 Setup 1.0.0.exe - Portable:
dist/文件搜索工具-1.0.0-portable.exe
For detailed build instructions, see build-instructions.md.
- Enter the folder path to search (or click "Browse").
- (Optional) Enter keyword for filenames.
- (Optional) Select file types to search.
- Click "Search" to begin.
- View found files in the results list (keywords are highlighted).
- Use the right-side buttons to:
- Click "Clear" to remove all search records.
- Parallel Search: Up to 3 subdirectories concurrently.
- Batch Processing: Retrieves and sends file info in batches (every 20 files or 500ms).
- Smart Skip: Automatically skips system directories, development folders (
node_modules,.git), and system files. - Performance Gains: 2-3x faster in directories with many small files, 3-5x faster in large structures.
- Electron 41.1.1
- Node.js
- HTML5 + CSS3
- JavaScript (ES6+)
├── file-search.html # Main UI
├── search-renderer.js # Renderer process logic
├── search-main.js # Main process logic (optimized search algorithm)
├── search-preload.js # Preload script
├── package.json # Project config
├── README.md # Documentation
├── build-instructions.md # Build instructions
└── .gitignore # Git ignore file
- Searching large directories may take time.
- Some system directories might be skipped due to permission issues.
- Specifying file types is recommended to improve efficiency.
- First-time packaging requires downloading dependencies (may take a few minutes).
Smart search algorithm
File type filtering
Keyword highlighting
Loading animations
Parallel search optimization
Batch processing optimization
Clear results feature
Real-time statistics
ISC
Jocelyn
一个基于 Electron 的高效文件搜索工具,具有智能搜索算法和友好的用户界面。
- 范围缩小优化:当在某个目录找到匹配文件时,优先搜索该目录的子目录
- 并行处理:最多3个子目录并行搜索,充分利用多核CPU
- 批量操作:批量获取文件信息和发送结果,减少IPC通信开销
- 避免重复扫描:自动记录已扫描的文件,防止重复搜索
- 深度优先策略:在找到匹配后,优先深入搜索相关目录
- 图像文件:jpg, png, gif, svg, webp 等
- 文档文件:pdf, doc, docx, txt, xlsx, ppt 等
- 视频文件:mp4, avi, mkv, mov 等
- 音频文件:mp3, wav, flac, aac 等
- 压缩包:zip, rar, 7z, tar 等
- 打开文件夹:快速在资源管理器中打开文件所在目录
- 浏览文件:直接打开文件
- 查看属性:查看文件详细信息(大小、创建时间、修改时间等)
- 关键词高亮:搜索结果中自动高亮显示关键词
- 清空结果:一键清空所有搜索结果
- 找到的文件数量
- 已扫描的文件数量
- 搜索耗时
- 搜索进度动画
安装依赖
npm install启动程序
npm start安装打包工具
npm install --save-dev electron-builder打包 Windows 版本
npm run build:win这会生成:
- 安装版:
dist/文件搜索工具 Setup 1.0.0.exe - 便携版:
dist/文件搜索工具-1.0.0-portable.exe
详细打包说明请查看 build-instructions.md
- 输入要搜索的文件夹路径(或点击"浏览"按钮选择)
- (可选)输入文件名关键词
- (可选)选择要搜索的文件类型
- 点击"搜索"按钮开始搜索
- 在结果列表中查看找到的文件(关键词会高亮显示)
- 使用右侧按钮进行操作:
- 点击"清空结果"清除所有搜索记录
- 每次最多3个子目录并行搜索
- 充分利用多核CPU性能
- 大幅提升搜索速度
- 批量获取文件信息(使用 Promise.all)
- 每20个文件或每500ms批量发送结果
- 减少IPC通信和UI更新开销
- 自动跳过系统目录(Windows、Program Files等)
- 跳过开发目录(node_modules、.git等)
- 跳过系统文件(pagefile.sys、swapfile.sys等)
- 限制递归深度防止过深搜索
- 小文件密集目录:提升 2-3倍
- 大型目录结构:提升 3-5倍
- 多核CPU环境:提升更明显
- Electron 41.1.1
- Node.js
- HTML5 + CSS3
- JavaScript (ES6+)
├── file-search.html # 主界面
├── search-renderer.js # 渲染进程逻辑
├── search-main.js # 主进程逻辑(优化的搜索算法)
├── search-preload.js # 预加载脚本
├── package.json # 项目配置
├── README.md # 说明文档
├── build-instructions.md # 打包说明
└── .gitignore # Git忽略文件
- 搜索大型目录可能需要较长时间
- 某些系统目录可能因权限问题无法访问(会自动跳过)
- 建议搜索时指定文件类型以提高效率
- 首次打包需要下载依赖,可能需要几分钟
ISC
Jocelyn
如有问题或建议,欢迎反馈!