Skip to main content

A smart file organization utility

Project description

Fylax

A smart file organization utility

Author: John Tocci

A simple utility to organize files in a chosen folder into subfolders based on file extensions defined in config.json.

Quick start

  1. Install dependencies (Windows PowerShell):
pip install -r requirements.txt
  1. Run the GUI:
python .\src\gui.py
  1. Select a folder and click Organize. Progress and results will stream in the log.
    • Enhanced Dry-Run Preview: When dry-run mode is enabled, Fylax shows an interactive preview with a tree view of proposed file movements, allowing you to select/deselect specific files before proceeding.
    • Drag & Drop: Drag folders from your file explorer and drop them onto the application to select them quickly.
    • Undo Functionality: Use "Undo Last Operation" to safely revert file movements and copies.
    • Profiles: Switch between different rule configurations in the Settings tab for different organization scenarios.
    • Duplicate Detection: Use the Duplicates tab to find and handle duplicate files with content-based detection.
    • Appearance menu switches Light/Dark/System.
    • Options let you include subfolders, dry-run, choose move/copy, and set a catch-all folder.
    • Theme changes apply immediately; if a run is active, they apply once it finishes.

App icon

Place an icon file in assets/ and it will be picked up automatically on startup:

  • assets/app.ico (Windows)
  • assets/app.png (macOS/Linux optional)

Packaging (optional)

Create a single-file Windows executable with the app icon using PyInstaller. Run these in PowerShell from the project root, preferably with your virtual environment's Python:

pip install pyinstaller
pyinstaller --noconfirm ^
  --windowed ^
  --name Fylax ^
  --icon assets/app.ico ^
  --add-data "assets;assets" ^
  src/gui.py

Notes:

  • --windowed prevents a console window.
  • --icon assets/app.ico sets the executable’s icon.
  • --add-data "assets;assets" bundles the assets folder; on macOS/Linux use assets:assets.
  • After build, the app is in dist/Fylax/ (folder) or dist/Fylax.exe if using --onefile.

To build a single-file exe add --onefile:

pyinstaller --noconfirm --windowed --onefile --name Fylax --icon assets/app.ico --add-data "assets;assets" src/gui.py

Configure rules

Fylax supports both traditional extension-based rules and advanced pattern-based rules.

Basic Rules (Extension-based)

Edit the rules section in config.json:

{
  "rules": {
    ".pdf": "Documents/PDFs",
    ".jpg": "Images/Photos",
    ".mp4": "Videos"
  }
}

Advanced Rules

Fylax supports advanced organization rules for more sophisticated file management:

{
  "rules": { "...": "..." },
  "advanced_rules": [
    {
      "type": "filename_pattern",
      "pattern": "invoice_*.pdf",
      "destination": "Invoices"
    },
    {
      "type": "filename_pattern",
      "pattern": "vacation_2024_*",
      "destination": "Photos/Vacation 2024"
    },
    {
      "type": "date",
      "condition": "older_than_days",
      "value": 365,
      "destination": "Archive/{{year}}/{{month}}"
    },
    {
      "type": "size",
      "condition": "larger_than_mb",
      "value": 1024,
      "destination": "Large Files"
    }
  ]
}

Rule Types

Filename Pattern Rules:

  • pattern: Wildcard pattern (* and ?) or regex if use_regex: true
  • Matches files based on filename patterns

Date Rules:

  • condition: older_than_days, newer_than_days, or between_days
  • value: Number of days (or [min, max] for between_days)
  • Supports template variables: {{year}}, {{month}}, {{month_num}}, {{day}}

Size Rules:

  • condition: larger_than_mb, smaller_than_mb, larger_than_kb, smaller_than_kb, between_mb
  • value: Size threshold in MB/KB (or [min, max] for between)

Advanced rules take priority over extension-based rules when they match.

Subfolders will be created inside the folder you choose when organizing.

User Experience Features

Enhanced Dry-Run Preview

When dry-run mode is enabled, Fylax displays an interactive preview dialog showing:

  • Tree view of all files and their proposed destinations
  • Ability to select/deselect individual files for organization
  • Summary of what will be moved, copied, or skipped
  • "Proceed with Selected" option to execute only chosen operations

Undo Functionality

  • Operation Logging: All file movements and copies are logged automatically
  • One-Click Undo: "Undo Last Operation" button safely reverts the most recent organization
  • Batch Support: Undoes entire organization sessions, not just individual files
  • Conflict Resolution: Handles cases where original locations are occupied

Profile System

  • Multiple Configurations: Save different rule sets for various scenarios (Work, Personal, etc.)
  • Quick Switching: Change active profiles from the Settings tab
  • Rule Isolation: Each profile maintains its own set of traditional and advanced rules
  • Import/Export Ready: Profiles are stored in a structured format for easy sharing

Drag & Drop Support

  • Folder Selection: Drag folders from file explorer directly onto the application
  • Visual Feedback: Clear indication of drop zones and selected folders
  • Cross-Platform: Works on Windows, macOS, and Linux

Duplicate File Detection

  • Content-Based Detection: Uses MD5 hashing to identify files with identical content
  • Smart Scanning: Groups files by size first for efficient detection
  • Flexible Handling: Options to move duplicates to a folder, delete them, or skip
  • Keep Criteria: Choose which file to keep (first found, shortest path, longest path)
  • Size Filtering: Set minimum file size to avoid scanning tiny files
  • Progress Tracking: Real-time progress updates during scanning
  • Detailed Results: Shows duplicate groups with file sizes and locations

Advanced options (engine)

The organizing function accepts options (exposed in the GUI):

  • include_subfolders: process files in nested folders
  • mode: 'move' or 'copy'
  • dry_run: simulate without changing files
  • unknown_destination: folder name to use for unmatched extensions

The summary reports moved/copied/skipped/errors and simulations when dry-run is enabled.

Troubleshooting

  • If you see an error about customtkinter not found, install it:
pip install customtkinter
  • If the window looks odd on high-DPI screens, try switching Appearance to System or Light.

Project details


Download files

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

Source Distribution

fylax-1.0.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

fylax-1.0.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file fylax-1.0.0.tar.gz.

File metadata

  • Download URL: fylax-1.0.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fylax-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b8b785a95e624fdf8c820c02617b0bcbfdaeb59eef5a4f5fd11b926d44f257e5
MD5 09039e91fec44c70199c822fdd4284be
BLAKE2b-256 86f20ea4e8e8c661673c26a3d29d9930029b9149817061c18d30d78216c49fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for fylax-1.0.0.tar.gz:

Publisher: python-publish.yml on JohnTocci/Fylax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fylax-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fylax-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fylax-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fb0de0b5b19e9c5353053968199b868b68ff055055be15d3f578270bf95d5ab
MD5 9f51cc3e5a14994fbeaecdc01c3051b7
BLAKE2b-256 fb23d21812e315f609063bf753483889a0520ff4619f32a0ac5d0967383340c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fylax-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on JohnTocci/Fylax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page