This project is developed as a personal solution to help keep the Downloads folder organized. It categorizes files and directories in the Downloads folder based on their file types and last modified dates into a structured, year-based format. Ignored files and paths are not moved and may be archived as per configuration.
A beautiful, wizard-style terminal interface that guides you through file organization with:
- Interactive menus and navigation
- Live preview of changes before execution
- Visual tree structure display
- Statistics and analytics
- Configuration management UI
- No command-line arguments needed!
Traditional command-line interface for automation and scripting
- β Categorizes files based on configuration rules
- β Organizes files by year (based on modification date)
- β Ignores files and directories based on patterns
- β Archives directories as needed
- β Supports intelligent deduplication of files
- β Preview mode to see changes before execution
- β Detailed logging and statistics
- π― Interactive Wizard: Step-by-step guidance through organization process
- ποΈ Live Preview: Visual tree structure of proposed changes
- π Statistics Dashboard: File distribution by type, year, and size
- βοΈ Configuration Manager: Edit categories and rules through UI
- π¨ Beautiful Interface: Color-coded, easy-to-read terminal UI
- β¨οΈ Keyboard Navigation: Full keyboard support with arrow keys
- π Directory Browser: Interactive directory selection
- π Category Manager: Add, edit, or delete categories visually
- Python 3.6 or higher
- Dependencies (see requirements.txt)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies:
pip install -r requirements.txt
Simply run the TUI wizard:
python fast_tui.pyOr make it executable and run directly:
chmod +x fast_tui.py
./fast_tui.pyFeatures:
- Navigate with arrow keys
- Select options with Enter
- Cancel with Ctrl+C
- Follow the wizard for step-by-step guidance
Main Menu Options:
- π Organize Files - Interactive wizard for file organization
- ποΈ Preview Organization - See changes without executing
- βοΈ View/Edit Configuration - Manage your settings
- π Manage Categories - Add/edit/delete file categories
- π View Statistics - Analyze directory contents
- β Help - Detailed help and documentation
For automation, scripting, or advanced users:
python fast.py --path /path/to/downloads-
Test mode: Use
-tor--testto run in test mode without actually moving files:python fast.py --path /path/to/downloads --test
-
Simulate mode: Use
-sor--simulateto simulate and visualize the changes:python fast.py --path /path/to/downloads --simulate
-
Simulate to file: Specify a base name for the simulation output file (timestamp will be added):
python fast.py --path /path/to/downloads --simulate --simulate_file simulate_output
-
Logging: Log the process to a file with the given base name (timestamp will be added):
python fast.py --path /path/to/downloads --log_file log_output
-
Deduplication (prompt): Prompt before handling duplicate files:
python fast.py --path /path/to/downloads --dedup
-
Deduplication (force): Automatically keep the most recent file (dangerous option):
python fast.py --path /path/to/downloads --dedup-force
To organize files in the Downloads folder in test mode with logging:
python fast.py --path ~/Downloads --test --log_file organize_downloads_logThe categories.conf file specifies categories and ignore/archival rules:
# Category format: FolderName: extension1, extension2, ...
archive_documents: pdf, docx, txt, odf, xls, xlsx, ppt, pptx
archive_pictures: png, jpeg, jpg, gif, bmp, svg, webp
archive_videos: mp4, avi, mkv, mov, flv, wmv, webm
archive_music: mp3, wav, flac, aac, ogg, m4a
# Ignore file types (won't be organized)
ignore: tmp, log, cache
# Ignore specific paths (won't be organized)
ignore_path: path1, path2
# Archive specific directories as a whole
archive_dir: OldDownloads
Configuration Tips:
- Categories are organized as
Year/CategoryName/files - Use the TUI's Category Manager for easy editing
- You can have multiple configuration files and switch between them
- Scan: FAST scans the target directory for files and directories
- Categorize: Files are categorized based on their extension
- Year Assignment: Each file is assigned to a year based on modification date
- Preview (optional): See the proposed structure before changes
- Execute: Files are moved to
Year/Category/filenamestructure
Example Structure:
Downloads/
βββ 2024/
β βββ archive_documents/
β β βββ report.pdf
β β βββ presentation.pptx
β βββ archive_pictures/
β β βββ photo1.jpg
β β βββ photo2.png
β βββ archive_videos/
β βββ video.mp4
βββ 2023/
βββ archive_documents/
β βββ old_doc.pdf
βββ archive_music/
βββ song.mp3
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ββββββββ ββββββ βββββββββββββββββ ββββββββββββ ββββββ β
β βββββββββββββββββββββββββββββββββ ββββββββββββ ββββββ β
β ββββββ ββββββββββββββββ βββ βββ βββ ββββββ β
β ββββββ ββββββββββββββββ βββ βββ βββ ββββββ β
β βββ βββ βββββββββββ βββ βββ ββββββββββββ β
β βββ βββ βββββββββββ βββ βββ βββββββ βββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Always Preview First: Use preview mode or test mode before actual execution
- Backup Important Data: Make backups before organizing critical files
- Start Small: Test on a small directory first
- Check Logs: Review log files after organization
- Customize Categories: Tailor categories to your workflow
- Use Test Mode: Run with
--testflag to verify behavior
Issue: Files not being categorized
- Solution: Check if file extension is in
categories.conf
Issue: Files being ignored unexpectedly
- Solution: Review
ignoreandignore_pathpatterns in config
Issue: Dependencies not found
- Solution: Run
pip install -r requirements.txt
Issue: Permission errors
- Solution: Ensure you have write permissions on target directory
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
- Watch mode for automatic organization
- Multiple configuration profiles
- Cloud storage integration
- Advanced filtering rules
- Undo functionality
- GUI version
This project is licensed under the terms of the MIT license.