Skip to main content

S-Organizer

Automatic file organization with PyQt6 GUI.

Features

  • Real-time monitoring - Watch folders and auto-organize files as they appear
  • Rule-based sorting - Define rules to move, copy, rename, or delete files
  • Flexible matching - Match by extension, name pattern, size, age, or content keywords
  • Content-aware sorting - Search within PDF, DOCX, XLSX, CSV, TXT, and image EXIF data
  • Undo support - Reverse any file operation from history (persisted across sessions)
  • Duplicate detection - Find and handle duplicate files with CSV export
  • Rule templates - Browse pre-built templates when creating new rules
  • JSON rules - Easy to create, share, and version control rules
  • Dark theme - Switch between light and dark themes
  • System tray - Minimize to tray with notifications for file operations
  • One-shot scan - Scan a folder once without continuous monitoring
  • Log to file - Configurable file logging with rotation
  • CLI mode - Command-line interface for headless scanning
  • Auto-update - Built-in check for updates (Help menu in GUI)
  • Windows Installer - Proper installer that registers in Control Panel

Installation

Option 1: Windows Installer (Recommended)

  1. Go to Releases
  2. Download S-Organizer-0.4.0-Setup.exe
  3. Run the installer — it registers in Control Panel > Programs and Features for easy uninstall
  4. Windows Defender Warning: If you see a false positive warning, click "More info" → "Run anyway" or add an exclusion for the file

Option 2: Standalone EXE (Windows)

  1. Go to Releases
  2. Download S-Organizer.exe
  3. Windows Defender Warning: If you see a false positive warning, click "More info" → "Run anyway" or add an exclusion for the file

Option 3: Install with pip

pip install s-organizer

Option 4: From source

git clone https://github.com/Shrestha7/S-Organizer.git
cd s-organizer
pip install -r requirements.txt
# Or install in development mode
pip install -e ".[dev,content]"

Usage

GUI Mode (Default)

python -m src.main
# Or simply double-click the exe/installed shortcut

CLI Mode

# One-time scan of a folder
python -m src.main --scan ~/Downloads

# Use custom config
python -m src.main --scan ~/Downloads --config my_config.json

# Show version
python -m src.main --version

Python API

from src.main import FileOrganizer

# Initialize the organizer
organizer = FileOrganizer()

# Add a folder to watch
organizer.add_watched_folder("~/Downloads")

# Start monitoring
organizer.start()

Features Guide

Creating Rules

Create a JSON file in the rules/ directory:

{
  "name": "Move PDFs to Documents",
  "enabled": true,
  "trigger": {
    "folder": "~/Downloads",
    "recursive": false
  },
  "match": {
    "extensions": [".pdf", ".docx"]
  },
  "action": {
    "type": "move",
    "destination": "~/Documents/{extension}/{name}{extension}"
  }
}

Rule Format

Trigger

  • folder: Directory to monitor
  • recursive: Watch subdirectories (default: false)

Match

  • extensions: List of file extensions (e.g., [".pdf", ".txt"])
  • name_pattern: Glob pattern (e.g., ".pdf", "report_")
  • min_size / max_size: Size limits (supports "1MB", "100KB", "1GB")
  • min_age_days / max_age_days: Age limits in days
  • content_keywords: Search within file contents (PDF, DOCX, XLSX, CSV, TXT, images)

Action

  • type: "move", "copy", "rename", or "delete"
  • destination: Target path with placeholders (for move/copy)
  • template: New name template (for rename)

Placeholders

  • {name} - File name without extension
  • {extension} / {ext} - File extension
  • {date} - Last modified date (YYYY-MM-DD)
  • {year}, {month}, {day} - Date components
  • {parent} - Parent directory name

Rule Templates

Click the Templates button in the Rule Editor to browse pre-built templates:

  • Document Organization - Sort PDFs, Word docs, spreadsheets
  • Media Sorting - Organize photos, videos, audio files
  • Archive Management - Handle old files and backups
  • Development Files - Sort code, configs, logs

Select a template and click "Use Template" to create a new rule instantly.

Duplicate Detection

  1. Open the Duplicates tab
  2. Select a folder and click Scan for Duplicates
  3. Review the results — duplicates are grouped by content hash
  4. Choose an action:
    • Keep Original (oldest) - Skip the oldest file in each group
    • Move Duplicates to Folder - Move duplicate copies to a specified folder
    • Delete Duplicates - Send duplicates to trash
  5. Click Apply Action to Selected or use Export to CSV to save results

Logging

Configure logging in Settings:

  • Log Level: DEBUG, INFO, WARNING, or ERROR
  • Log File: Path to a log file (leave empty for stdout only)

Logs are automatically rotated (max 5MB, keep 3 backups).

System Tray

  • Double-click the tray icon to show/hide the main window
  • Right-click for quick access to:
    • Start/Stop monitoring
    • Settings
    • Quit
  • Desktop notifications for file operations (when enabled)

Auto-Update

  1. Go to Help > Check for Updates
  2. If an update is available, click Download
  3. Restart the app to apply the update

History and Undo

  • All file operations are logged in the History tab
  • Click Undo to reverse any operation
  • History persists across sessions (stored in history/history.json)
  • Export history to JSON for backup

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=src

# Lint
ruff check src/

# Type check
mypy src/

Project Structure

s-organizer/
├── src/
│   ├── core/           # File monitoring, rule engine, operations
│   ├── rules/          # Rule definitions and matching
│   ├── gui/            # PyQt6 GUI components
│   ├── resources/      # Icons and assets
│   └── utils/          # Configuration and helpers
├── tests/              # Test suite (43 tests)
├── rules/              # Sample JSON rule files
├── installer/          # Inno Setup installer script
├── docs/               # Documentation
└── main.py             # Entry point

License

Apache License 2.0 - see LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

s_organizer-0.4.1.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

s_organizer-0.4.1-py3-none-any.whl (54.4 kB view details)

Uploaded Python 3

File details

Details for the file s_organizer-0.4.1.tar.gz.

File metadata

  • Download URL: s_organizer-0.4.1.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for s_organizer-0.4.1.tar.gz
Algorithm Hash digest
SHA256 685bea3520e7ab22945b4d484e3f65c3b546c96b9262aee3a28c6bf0ea93c143
MD5 11119e1667179f5d23d31807c34d5e55
BLAKE2b-256 25c48d7f82820d259c4cae4fbf8b3e361900474188d32b388254788eac39c113

See more details on using hashes here.

File details

Details for the file s_organizer-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: s_organizer-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 54.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for s_organizer-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 326c9b60ae88ce0f8dcf7e5b8d2b00e217abf775570d64dc187b4a54b589fb69
MD5 95eac7f18c54fd88d0c70113ff4d04c7
BLAKE2b-256 86886fa772e0ab7ae73e22881ff964b36724bec3d3014bae15e46a9399c6a3d9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page