Skip to content

Releases: bocaletto-luca/Directory-Monitor

Directory Monitor

05 Jul 23:44
ff61c97

Choose a tag to compare

Directory Monitor with GUI

Author: Bocaletto Luca

License: GPL v3

Self-contained Python application for polling-based directory monitoring.
Languages English and Italian interfaces in two standalone scripts:

  • main_eng.py – English UI and prompts
  • main_ita.py – Italian UI and prompts

Author: Bocaletto Luca
License: GPL v3


Table of Contents

  1. Overview
  2. Features
  3. Repository Structure
  4. Requirements
  5. Installation
  6. Usage
  7. Configuration Options
  8. Logging
  9. License

Overview

Directory Monitor is a lightweight, text-menu tool written in pure Python (stdlib only) that lets you watch one or more folders for filesystem changes via polling. It detects:

  • File and folder creation
  • Deletion
  • Modification

You can configure recursive scans, include/exclude hidden entries, and apply advanced glob filters. Press ESC at any time during monitoring to stop and return to the menu.


Features

  • Monitor multiple directories simultaneously
  • Recursive or non-recursive scanning
  • Toggle hidden file/folder inclusion
  • Glob-based include/exclude filters
  • Configurable polling interval
  • Real-time console and optional file logging
  • Easily switch between English and Italian interfaces
  • No external dependencies (Python 3.6+ stdlib only)

Repository Structure

Directory-Monitor/
├── LICENSE
├── README.md
├── main_eng.py      # English interface
└── main_ita.py      # Italian interface

Requirements

  • Python 3.6 or later
  • Standard library modules only: os, sys, time, fnmatch, logging, termios, tty, select, pathlib
  • No third-party packages required

Installation

  1. Clone the repository

    git clone https://github.com/bocaletto-luca/Directory-Monitor.git
    cd Directory-Monitor
  2. (Optional) Make scripts executable

    chmod +x main_eng.py main_ita.py

Usage

Run the script corresponding to your preferred language:

English Version

python3 main_eng.py
# Or, if executable:
./main_eng.py

Italian Version

python3 main_ita.py
# Or, if executable:
./main_ita.py

Follow the on-screen menu to configure directories, polling interval, recursion, hidden files, filters, and logging.


Configuration Options

Once you start the script, you can:

  1. Add/Remove Directories
  2. Set Polling Interval (in seconds)
  3. Toggle Recursive Scan
  4. Toggle Hidden Entries
  5. Manage Advanced Filters
    • Include patterns (e.g. *.log, data/**/*.csv)
    • Exclude patterns (e.g. temp/*, */.git/*)
  6. Specify Log File (or use stdout)
  7. Start/Stop Monitoring (press ESC to stop)
  8. Exit

Logging

Events are logged in the format:

YYYY-MM-DD HH:MM:SS,mmm LEVEL   [base_path] +Added   FILE: example.txt
YYYY-MM-DD HH:MM:SS,mmm LEVEL   [base_path] *Modified DIR : docs/
YYYY-MM-DD HH:MM:SS,mmm LEVEL   [base_path] -Removed  FILE: old.log
  • +Added → new file/folder
  • *Modified → timestamp changed
  • -Removed → file/folder deleted

Logs appear in the console by default. To capture them in a file, specify a logfile path in the menu.


License

This project is released under the GNU General Public License v3.0.
See the LICENSE file for details.


© 2025 Bocaletto Luca
https://github.com/bocaletto-luca/Directory-Monitor