A smart file organization utility that automatically sorts files into structured folders based on customizable rules
Project description
๐๏ธ Fylax - Smart File Organization Utility
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
- Launch Fylax using one of the methods above
- Select a folder to organize (or drag & drop it onto the app)
- Choose your settings:
- Enable dry-run mode to preview changes
- Select move or copy operation
- Choose whether to include subfolders
- 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
Dry-Run Preview
Duplicate Detection
๐ง 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.jsonfor 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
- ๐ Check our Wiki for detailed guides
- ๐ฌ Open a discussion for questions
- ๐ Report bugs for technical issues
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Author
John Tocci
- ๐ Website: johntocci.com
- ๐ง Email: john@johntocci.com
- ๐ GitHub: @JohnTocci
๐ 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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
021455f691a9f7c2fd791ab96f9479e4934a1bca7249ced78553d3138df23f8d
|
|
| MD5 |
66c10cfaab926052caa31ea6582d460e
|
|
| BLAKE2b-256 |
e262da614ae3770047dcaac04fbc7636ac4b6411d88f103d46a466a2f87c800b
|
Provenance
The following attestation bundles were made for fylax-1.0.1.tar.gz:
Publisher:
python-publish.yml on JohnTocci/Fylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fylax-1.0.1.tar.gz -
Subject digest:
021455f691a9f7c2fd791ab96f9479e4934a1bca7249ced78553d3138df23f8d - Sigstore transparency entry: 454107403
- Sigstore integration time:
-
Permalink:
JohnTocci/Fylax@ec2d1bd80b75d5edbbf9fe3166742a720f821522 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/JohnTocci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ec2d1bd80b75d5edbbf9fe3166742a720f821522 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f34a6b9fc7e893f127a6d2da4cb6c4590d7279e3dc224c847a46da3628600389
|
|
| MD5 |
64f3ccbca9ceb6351bae8ff8fc5ce93a
|
|
| BLAKE2b-256 |
b61a970ed3e985e57b2264e129cdb1f3001e1fb2d335fe60547e9119269c5e2c
|
Provenance
The following attestation bundles were made for fylax-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on JohnTocci/Fylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fylax-1.0.1-py3-none-any.whl -
Subject digest:
f34a6b9fc7e893f127a6d2da4cb6c4590d7279e3dc224c847a46da3628600389 - Sigstore transparency entry: 454107426
- Sigstore integration time:
-
Permalink:
JohnTocci/Fylax@ec2d1bd80b75d5edbbf9fe3166742a720f821522 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/JohnTocci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ec2d1bd80b75d5edbbf9fe3166742a720f821522 -
Trigger Event:
release
-
Statement type: