Skip to main content

A smart file organization utility that automatically sorts files into structured folders based on customizable rules

Project description

๐Ÿ—‚๏ธ Fylax - Smart File Organization Utility

License: MIT Python 3.8+ Platform Support

Fylax is an intelligent file organization tool that automatically sorts your files into structured folders based on customizable rules. Whether you're dealing with a cluttered Downloads folder or organizing years of documents, Fylax makes file management effortless with its intuitive GUI and powerful automation features.

โœจ Key Features

๐ŸŽฏ Smart Organization

  • Extension-based Rules: Automatically sort files by type (.pdf โ†’ Documents/PDFs)
  • Advanced Pattern Matching: Organize by filename patterns (invoice_*.pdf โ†’ Invoices)
  • Date-based Sorting: Archive old files by date (files older than 1 year โ†’ Archive/2023/March)
  • Size-based Filtering: Handle large files differently (files > 1GB โ†’ Large Files)

๐Ÿ” Enhanced Preview & Control

  • Interactive Dry-Run: Preview all changes before applying them
  • Selective Organization: Choose exactly which files to move/copy
  • Tree View: Visual representation of proposed file structure
  • One-Click Undo: Safely revert any organization operation

๐Ÿ”ง Powerful Management

  • Profile System: Multiple rule sets for different scenarios (Work, Personal, etc.)
  • Duplicate Detection: Find and handle duplicate files intelligently
  • Drag & Drop: Simply drag folders onto the app to select them
  • Cross-Platform: Works seamlessly on Windows, macOS, and Linux

๐Ÿ›ก๏ธ Safety First

  • Protected Files: Automatically skips system and application files
  • Conflict Resolution: Smart handling of naming conflicts
  • Operation Logging: Complete audit trail of all file operations
  • Backup Integration: Safe organization with full rollback capability

๐Ÿš€ Quick Start

๐Ÿ“ฆ Installation

Option 1: Using pip (Recommended)

pip install fylax
fylax

Option 2: From Source

# Clone the repository
git clone https://github.com/JohnTocci/Fylax.git
cd Fylax

# Install dependencies
pip install -r requirements.txt

# Run the application
python src/fylax/gui.py

Option 3: Windows Executable

Download the latest .exe file from the Releases page and run directly.

๐ŸŽฎ Basic Usage

  1. Launch Fylax using one of the methods above
  2. Select a folder to organize (or drag & drop it onto the app)
  3. Choose your settings:
    • Enable dry-run mode to preview changes
    • Select move or copy operation
    • Choose whether to include subfolders
  4. Click "Organize" and watch your files get sorted!

โš™๏ธ Configuration

Fylax uses a config.json file to define organization rules. You can edit this file directly or use the built-in GUI editor.

๐Ÿ“ Basic Rules (Extension-based)

Perfect for simple file type organization:

{
  "rules": {
    ".pdf": "Documents/PDFs",
    ".jpg": "Images/Photos", 
    ".jpeg": "Images/Photos",
    ".png": "Images/Screenshots",
    ".mp4": "Videos",
    ".mp3": "Audio/Music",
    ".zip": "Archives",
    ".exe": "Software"
  }
}

๐ŸŽฏ Advanced Rules

For more sophisticated organization needs:

{
  "advanced_rules": [
    {
      "type": "filename_pattern",
      "pattern": "invoice_*.pdf",
      "destination": "Business/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 Reference

Rule Type Description Example
filename_pattern Match files by name pattern screenshot_*.png
date Organize by file age Files older than 1 year
size Sort by file size Files larger than 100MB
extension Basic file type sorting .pdf โ†’ Documents

๐ŸŽญ Profile System

Create different rule sets for different scenarios:

{
  "active_profile": "work",
  "profiles": {
    "work": {
      "rules": {
        ".pdf": "Work/Documents",
        ".xlsx": "Work/Spreadsheets"
      }
    },
    "personal": {
      "rules": {
        ".jpg": "Personal/Photos",
        ".mp3": "Personal/Music"
      }
    }
  }
}

๐Ÿ–ผ๏ธ Screenshots

Main Interface

Main Interface

Dry-Run Preview

Preview Dialog

Duplicate Detection

Duplicate Scanner


๐Ÿ”ง Advanced Usage

๐Ÿ“ฆ Building Executables

Create a standalone Windows executable:

# Install PyInstaller
pip install pyinstaller

# Build single-file executable
pyinstaller --noconfirm --windowed --onefile \
  --name Fylax \
  --icon assets/app.ico \
  --add-data "assets;assets" \
  src/fylax/gui.py

The executable will be created in the dist/ folder.

๐Ÿ Python API

Use Fylax programmatically in your own scripts:

from fylax.main import organize_folder

# Organize a folder with custom settings
result = organize_folder(
    folder_path="/path/to/messy/folder",
    profile_name="default",
    mode="move",           # or "copy"
    dry_run=False,
    include_subfolders=True,
    unknown_destination="Misc"
)

print(f"Organized {result['moved']} files")

๐Ÿ” Duplicate File Management

from fylax.main import find_duplicate_files, handle_duplicates

# Find duplicates
duplicates = find_duplicate_files(
    folder_path="/path/to/folder",
    min_size_mb=1  # Skip files smaller than 1MB
)

# Handle duplicates automatically
handle_duplicates(
    duplicates,
    action="move",         # "move", "delete", or "skip"
    destination="Duplicates",
    keep_criteria="shortest_path"  # or "longest_path", "first_found"
)

๐Ÿ”’ Safety & Security

Fylax is designed with safety as a top priority:

  • Protected Extensions: Automatically skips system files (.exe, .dll, .sys, etc.)
  • Dangerous Path Detection: Blocks organization of system directories
  • Hidden File Handling: Respects hidden file attributes across platforms
  • Operation Logging: Complete audit trail for all file operations
  • Undo Functionality: One-click rollback for recent operations

๐Ÿšซ Protected File Types

The following file types are never moved to prevent system damage:

  • Executables: .exe, .dll, .sys, .msi
  • System files: .ini, .lnk, .bat, .cmd
  • Application bundles: .app, .msix, .appx

๐Ÿ› ๏ธ Development

๐Ÿ—๏ธ Setup Development Environment

# Clone repository
git clone https://github.com/JohnTocci/Fylax.git
cd Fylax

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development dependencies
pip install -r requirements.txt
pip install -e .

# Run in development mode
python src/fylax/gui.py

๐Ÿงช Running Tests

# Run all tests
python -m pytest tests/

# Run with coverage
python -m pytest tests/ --cov=fylax

๐Ÿ“ Code Style

This project uses:

  • Black for code formatting
  • isort for import sorting
  • flake8 for linting
  • mypy for type checking
# Format code
black fylax/
isort fylax/

# Check style
flake8 fylax/
mypy fylax/

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

๐Ÿ› Bug Reports

Found a bug? Please open an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • System information (OS, Python version)

๐Ÿ’ก Feature Requests

Have an idea? We'd love to hear it! Create a feature request with:

  • Clear description of the feature
  • Use case and benefits
  • Proposed implementation (if any)

๐Ÿ”ง Troubleshooting

Common Issues

Q: Error about customtkinter not found

pip install customtkinter>=5.2.2

Q: GUI looks odd on high-DPI screens

  • Try switching Appearance to "System" or "Light" in the app settings

Q: Files not organizing as expected

  • Check your rules in config.json for syntax errors
  • Ensure destination folders don't conflict with source folders
  • Enable dry-run mode to preview the organization

Q: Application won't start

  • Ensure Python 3.8+ is installed
  • Verify all dependencies are installed: pip install -r requirements.txt
  • Check for error messages in the console

๐Ÿ“ž Getting Help


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ค Author

John Tocci


๐Ÿ™ Acknowledgments

  • Thanks to all contributors who have helped improve Fylax
  • Built with CustomTkinter for the modern GUI
  • Icons provided by the community

โญ If you find Fylax helpful, please consider giving it a star on GitHub!

๐Ÿ” Back to top

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.1.tar.gz (35.9 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.1-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fylax-1.0.1.tar.gz
  • Upload date:
  • Size: 35.9 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.1.tar.gz
Algorithm Hash digest
SHA256 021455f691a9f7c2fd791ab96f9479e4934a1bca7249ced78553d3138df23f8d
MD5 66c10cfaab926052caa31ea6582d460e
BLAKE2b-256 e262da614ae3770047dcaac04fbc7636ac4b6411d88f103d46a466a2f87c800b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fylax-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: fylax-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f34a6b9fc7e893f127a6d2da4cb6c4590d7279e3dc224c847a46da3628600389
MD5 64f3ccbca9ceb6351bae8ff8fc5ce93a
BLAKE2b-256 b61a970ed3e985e57b2264e129cdb1f3001e1fb2d335fe60547e9119269c5e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fylax-1.0.1-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