Lightweight Portable Directory Monitor for USB and External Drives
What it is
A small, portable tool that watches directories on USB sticks and external drives for file changes (creates, modifies, deletes, renames) without requiring installation.
Core features
- Portability: Runs directly from removable media—no install or admin rights required.
- Real-time monitoring: Detects file system events immediately using native OS file-watch APIs (inotify on Linux, ReadDirectoryChangesW on Windows, FSEvents on macOS).
- Low resource usage: Minimal CPU/RAM footprint to avoid slowing down host systems.
- Selective watching: Monitor specific folders, subfolder depth, and file patterns (wildcards, extensions).
- Notifications: Optional on-screen alerts, log files, or app-level popups; configurable verbosity.
- Logging & export: Append-only logs with timestamps; export to plain text, CSV, or JSON for audit or analysis.
- Safe operation on removable media: Handles sudden disconnects gracefully, avoids caching that risks data loss.
- Config files: Portable settings stored alongside the executable so preferences travel with the drive.
Use cases
- Track changes to files on shared USB drives.
- Audit edits to configuration or log files on external disks.
- Detect accidental deletions or unwanted modifications on portable backups.
- Lightweight folder-watching for field technicians using laptops without installing software.
Security & reliability considerations
- Avoid running untrusted executables from unknown USBs.
- Ensure logs on the drive are encrypted if they contain sensitive filenames or metadata.
- Tool should handle media removal events and resume watching when the drive is reconnected.
- Prefer read-only operations when used on sensitive systems to minimize footprint.
Minimal implementation outline (cross-platform)
- Use native file-watch API per OS for efficiency.
- Provide a small command-line and optional GUI front end.
- Store settings in a local config file on the drive.
- Write append-only timestamped logs; offer CSV/JSON export.
- Implement safe shutdown and reconnection handling.
If you want, I can draft a short user guide, a sample config file, or a minimal cross-platform script to demonstrate core functionality.
Leave a Reply