A fast and modular Node.js directory scanner for developers and DevOps. Recursively scan directories, filter files by extension, and generate detailed JSON/CSV reports. Perfect for project analysis, code auditing, and file system exploration.
- Recursive Scanning: Explore directories and subdirectories up to a configurable depth.
- File Filtering: Filter files by extensions (e.g.,
.js
,.txt
). - Detailed Reports: Output results in JSON and CSV with file names, paths, types, sizes, and errors.
- Modular Config: Customize scan settings in
config.json
. - Error Handling: Automatic retries for transient errors with configurable delays.
- CLI-Friendly: Simple command-line interface for quick usage.
- Clone the repo:
git clone https://github.com/PicoBaz/NodeDirBlaster.git cd NodeDirBlaster
- Install dependencies:
npm install
- Edit
config.json
to set your directory path, extensions, and other settings.
Run the scanner:
node dir_scanner.js
- Output: Results in
scan_results.json
andscan_results.csv
. - Example Config: Scan
./src
for.js
files with max depth of 5:{ "directory": "./src", "extensions": [".js"], "maxDepth": 5, "retryCount": 3, "retryDelayMs": 1000 }
Edit config.json
:
directory
: Path to scan (e.g.,./
for current directory).extensions
: Array of file extensions to include (e.g.,[".js", ".txt"]
). Empty array includes all files.maxDepth
: Maximum recursion depth (e.g.,5
).retryCount
: Number of retries for failed operations.retryDelayMs
: Delay between retries in milliseconds.
- Add custom filters (e.g., by file size or date) in
dir_scanner.js
. - Integrate with external tools (e.g., for code analysis).
- Fork and add parallel scanning with
worker_threads
for large directories.
NodeDirBlaster is for authorized use only. Scan only directories you have permission to access. The author is not liable for misuse.
MIT License. See LICENSE for details.
Star the repo if it helps your workflow! 🌟 Contributions welcome.