How shehreenzainab/file-organizer-bot works
File Organizer Bot is a command-line folder organizer. The user selects preview, one-time sorting, or live watching; files are categorized by extension and either previewed or moved into category folders. The single runtime module owns configuration loading, both processing modes, collision handling, and moves. README capabilities such as configurable rules, fallback categorization, and duplicate-safe moves are reflected; future improvements are excluded.
Main entry points: organizer.py Organize file · config.json Rules config
Components 14
Startup and modes
- CLI startup
organizer.py - Rules config
config.json - Load config
organizer.py - Mode selection
organizer.py
File processing
- Organize file
organizer.py - Extension categories
organizer.py - Unique destination
organizer.py
Filesystem monitoring
- Existing-file scan
organizer.py - Watchdog observer
organizer.py - File creation events
- Event handler
organizer.py - Watch folder
- watchdog library
Other components
- User
Connections 17
- User → CLI startup: starts mode
- CLI startup → Load config: loads rules
- Rules config → Load config: provides rules
- CLI startup → Mode selection: passes options
- Load config → Mode selection: returns settings
- Mode selection → Existing-file scan: sort-existing
- Mode selection → Watchdog observer: starts watching
- Existing-file scan → Watch folder: lists files
- Existing-file scan → Organize file: organizes each file
- Watchdog observer → watchdog library: uses observer
- watchdog library → File creation events: detects creation
- File creation events → Event handler: dispatches event
- Event handler → Organize file: organizes file
- Organize file → Extension categories: classifies extension
- Organize file → Unique destination: chooses destination
- Unique destination → Watch folder: checks collision
- Organize file → Watch folder: moves file