A small directory watcher — refactored from very old code and published for fun, not as a production tool.
watch-dog polls a folder tree on a timer, compares file and directory state to a simple in-memory index, and prints structured lines when something is added, removed, or updated. It does not use OS-level file notifications; it is a straightforward Python script for learning and experimenting.
- Recursive scan under a path you choose
- Timestamps and scan cycle in each log line
- On Windows, optional owner hint for updated files (best-effort ACL lookup via PowerShell)
No third-party packages are required (standard library only). Use Python 3.8+.
git clone https://github.com/TIG00R/watch-dog.git
cd watch-dogThere is nothing to pip install for core usage. See requirements.txt for notes.
Interactive (prompts for a path):
python watch-dog.pyNon-interactive (recommended for scripts or CI):
python watch-dog.py "C:\path\to\folder"On Linux or macOS:
python watch-dog.py /home/you/projects/something