A comprehensive Python application for creating, visualizing, and managing folder structures with automatic file sorting capabilities. Features a mind-map style interface for intuitive organization.
- Mind-Map Style Folder Structure: Create and visualize folder hierarchies as an interactive mind map
- Smart File Classification: Automatic file sorting using intelligent algorithms
- Pre-defined Templates: Ready-to-use folder structures for common use cases
- Custom Folder Creation: Add, edit, and delete folders with custom properties
- Project Folder Detection: Automatically keeps project folders intact (Git repos, code projects, etc.)
- Interactive Canvas: Visual representation of your folder structure
- Configurable Display Options:
- Show/hide file counts
- Display file types
- Toggle comments and descriptions
- Custom color schemes
- Tree View: Traditional hierarchical view alongside mind map
- Real-time Statistics: File counts, sizes, and type distributions
- Import/Export: Save and load folder structures as JSON files
- Password Protection: Optional encryption for sensitive structures
- Source Selection: Choose any folder as the source for organization
- Target Selection: Specify where to create the organized structure
- Preview Changes: See what will happen before organizing files
- Extension-based Classification: High-confidence file type detection
- Keyword Analysis: Smart folder name and content analysis
- MIME Type Detection: Fallback classification method
- Project Integrity: Preserves complete project folders when detected
The app comes with a ready-to-use folder structure:
π My Files
βββ π¬ Media
β βββ π₯ Videos (.mp4, .avi, .mkv, .mov)
β βββ π· Photos & Pictures (.jpg, .png, .gif, .bmp)
β βββ π΅ Audio & Music (.mp3, .wav, .flac)
βββ π Documents (.pdf, .doc, .docx, .txt)
βββ π Private Data
βββ π» Projects - Programming (.py, .js, .java, .cpp)
βββ π Projects - Books & Writing
βββ π¦ Archives & Backups (.zip, .rar, .7z, .tar)
βββ π Data Files (.csv, .sql, .db)
βββ ποΈ Miscellaneous
Each folder includes:
- Name: Clear, descriptive title
- Description: What the folder contains
- Purpose: Why this folder exists
- File Extensions: Associated file types
- Color Coding: Visual distinction
- Icon: Emoji-based icon for quick recognition
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FOLDER STRUCTURE MANAGER β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [New] [Export] [Import] β [Add] [Edit] [Delete] β Source ββββ β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββ€
β β β
β FOLDER STRUCTURE β MIND MAP VISUALIZATION β
β βββββββββββββββ β βββββββββββββββββββββ β
β β β
β π My Files β βββββββββββββββ β
β βββ π¬ Media β β π My Files β β
β β βββ π₯ Videos β ββββββββ¬βββββββ β
β β βββ π· Photos β β β
β β βββ π΅ Audio β βββββββββββββΌββββββββββββ β
β βββ π Documents β β β β β
β βββ π Private β βββββΌββββ βββββΌββββ βββββΌββββ β
β βββ π» Programming β β Media β β Docs β βPrivateβ β
β βββ π Books β βββββ¬ββββ βββββββββ βββββββββ β
β βββ π¦ Archives β β β
β βββ π Data β βββββΌββββ β
β βββ ποΈ Misc β βVideos β β
β β βββββββββ β
β β β
β Name β Type β Files β β
β ββββββββββββββββββββ β β
β β β
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ€
β [π Organize Files] [ποΈ Preview] β Keep projects intact β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Status: Ready [ββββββββββ] 85% β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GUI LAYER β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β ToolbarFrame β β TreePanel β β CanvasPanel β β
β β (Actions) β β (Hierarchy) β β (Mind Map View) β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLICATION LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β FolderManagerGUI β β
β β - Manages UI components β β
β β - Handles user interactions β β
β β - Coordinates between views β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LOGIC LAYER β
β ββββββββββββββββββββββββ ββββββββββββββββββββββββ β
β β FolderStructureMgr β β SmartFileClassifier β β
β β ββββββββββββββββββββ β β βββββββββββββββββββ β β
β β β’ Node Management β β β’ Extension Map β β
β β β’ Path Generation β β β’ Keyword Analysis β β
β β β’ Import/Export β β β’ MIME Detection β β
β β β’ Statistics β β β’ Project Detection β β
β ββββββββββββββββββββββββ ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA LAYER β
β ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββ β
β β FolderNode β β FileStats β β FileType β β
β β (Dataclass) β β (Dataclass) β β (Enum) β β
β ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Python 3.8 or higher
- Tkinter (usually included with Python)
- Optional:
cryptographyfor password protection - Optional:
Pillowfor enhanced image support
# Basic installation (no additional packages needed for core features)
python3 folder_manager_app.py
# With optional dependencies for full features
pip install cryptography Pillow- Download the repository
- Ensure Python 3.8+ is installed
- Run:
python folder_manager_app.py
- Clone or download the repository
- Make executable:
chmod +x folder_manager_app.py - Run:
./folder_manager_app.pyorpython3 folder_manager_app.py
-
Copy plugin files:
# Copy to user directory mkdir -p ~/.local/share/thunar/uca-scripts cp thunar_plugin/thunar-folder-manager.py ~/.local/share/thunar/uca-scripts/ cp thunar_plugin/thunar-uca.xml ~/.local/share/Thunar/uca.xml # Or system-wide (requires sudo) sudo cp thunar_plugin/thunar-folder-manager.py /usr/share/thunar/uca-scripts/ sudo cp thunar_plugin/thunar-uca.xml /etc/xdg/Thunar/uca.xml
-
Make executable:
chmod +x ~/.local/share/thunar/uca-scripts/thunar-folder-manager.py -
Restart Thunar:
thunar -q # Quit Thunar thunar & # Restart
After installation:
- Right-click on any folder in Thunar
- Select "Organize with Folder Manager" from the context menu
- The application opens with the selected folder as the source
python3 folder_manager_app.py- Click "Browse" next to "Source"
- Navigate to the folder containing your unorganized files
- Click "Open"
- Click "Browse" next to "Target"
- Choose where to create the organized structure
- Click "Open"
- Use the tree view to see the folder hierarchy
- Right-click to add, edit, or delete folders
- Configure file extensions and colors for each folder
- Click "ποΈ Preview Changes" to see what will be organized
- Review the file type distribution
- Check "Keep project folders intact" if you have code projects
- Click "π Organize Files"
- Wait for the process to complete
- Click "π€ Export" to save your folder structure
- Optionally add password protection
- Load it later with "π₯ Import"
The app uses a multi-layered approach to classify files:
.mp4 β VIDEO
.jpg β IMAGE
.pdf β DOCUMENT
.py β CODE"vacation_photo.jpg" β IMAGE (contains "photo")
"meeting_recording.wav" β AUDIO (contains "recording")
"project_report.docx" β DOCUMENT (contains "report")video/* β VIDEO
image/* β IMAGE
text/* β DOCUMENT
application/zip β ARCHIVE- Analyzes folder names for keywords
- Examines folder contents for dominant file types
- Detects project indicators (.git, package.json, etc.)
The app intelligently identifies project folders that should remain intact:
Indicators:
- Version control:
.git/ - Package managers:
package.json,Cargo.toml,pom.xml - Build files:
Makefile,setup.py,build.gradle - IDE configs:
.vscode/,.idea/ - Dependencies:
node_modules/,__pycache__/
Mixed Content Detection:
- Code + Documentation = Keep intact
- Code + Data = Keep intact
- Multiple file types with structure = Keep intact
- Click "β Add Folder"
- Fill in the details:
- Name: Folder name
- Description: Brief description
- Purpose: Detailed purpose
- File Extensions: Comma-separated list (e.g.,
.py,.js,.ts) - Color: Choose a color for visualization
Use the checkboxes above the mind map:
- β File Count: Show number of files in each folder
- β File Types: Display associated file types
- β Comments: Show folder descriptions
- β Colors: Use custom folder colors
- Warm colors (red, orange): Important or urgent folders
- Cool colors (blue, green): Regular content folders
- Neutral colors (gray): Archive or miscellaneous folders
- Bright colors: Frequently accessed folders
The app tracks:
- Total files per folder
- Total size in bytes
- File type distribution (videos, images, documents, etc.)
- Extension breakdown
- Last modified date
When exporting your folder structure:
- Click "π€ Export"
- Choose "Yes" for password protection
- Enter a secure password
- The file is encrypted using Fernet (symmetric encryption)
To import a protected file:
- Click "π₯ Import"
- Select the encrypted file
- Choose "Yes" for password protection
- Enter the correct password
Issue: Application won't start
- Solution: Ensure Python 3.8+ is installed and tkinter is available
Issue: Can't see mind map
- Solution: Resize the window or click "Auto Layout"
Issue: Files not organizing correctly
- Solution: Check file extensions are correctly configured in folder settings
Issue: Thunar plugin not appearing
- Solution:
- Verify XML file is in correct location
- Restart Thunar completely (
thunar -q) - Check Thunar UCA is enabled
Issue: Permission errors during organization
- Solution: Run application with appropriate permissions or check file ownership
Source: ~/Downloads
Target: ~/Organized Files
Before:
Downloads/
βββ vacation.jpg
βββ report.pdf
βββ song.mp3
βββ movie.mp4
βββ archive.zip
After:
Organized Files/
βββ Photos & Pictures/
β βββ vacation.jpg
βββ Documents/
β βββ report.pdf
βββ Audio & Music/
β βββ song.mp3
βββ Videos/
β βββ movie.mp4
βββ Archives & Backups/
βββ archive.zip
Source: ~/Work
Target: ~/Organized Work
With "Keep project folders intact" enabled:
Work/
βββ my-python-project/
βββ src/
β βββ main.py
βββ tests/
βββ requirements.txt
βββ README.md
Stays intact as:
Organized Work/
βββ projects/
βββ my-python-project/
βββ src/
β βββ main.py
βββ tests/
βββ requirements.txt
βββ README.md
Contributions are welcome! Areas for improvement:
- Additional file type classifiers
- More pre-defined templates
- Enhanced visualization options
- Plugin support for other file managers
- Machine learning-based classification
MIT License - See LICENSE file for details
- Built with Python and Tkinter
- Uses cryptography library for encryption
- Inspired by mind-mapping tools and file managers
Happy Organizing! ποΈβ¨