Automation tool that cleans up Downloads folder and places items in appropriate locations
Project description
CDHL
CDHL (Clean Drive Happy Life) is a Python utility that automatically organizes files in your Downloads folder by file type, with a dry-run preview before making any changes.
Features
- Dry Run Preview - See what changes will be made before actually moving files
- Proper Categorization - Automatically sorts files into appropriate folders:
- Images (~/Pictures)
- Audio (~/Music)
- Videos (~Videos)
- Documents (~/Documents)
- Applications (~/Applications)
- Archives (~/Archive)
- Miscellaneous (~/Miscellaneous)
- Other (~/Other)
- Efficient Processing - Uses generators for memory-efficient handling of large directories
- Safe Operation - Requires user confirmation before moving files
- Comprehensive File Type Support - Recognizes 100+ file extensions across all major categories
Installation
pip install CDHL
Usage
from cleaner import chdl
# Run the file organizer
chdl()
The tool will:
- Scan your Downloads folder
- Show a preview of where each file will be moved
- Ask for confirmation
- Move files to their appropriate destinations
Supported File Types
- Images: jpg, jpeg, png, gif, webp, bmp, svg, tiff, heic, raw, and more
- Audio: mp3, wav, flac, aac, ogg, opus, and more
- Videos: mp4, mov, avi, mkv, webm, mpeg, and more
- Documents: pdf, doc, docx, txt, xlsx, ppt, csv, epub, and more
- Applications: exe, msi, app, dmg, apk, jar, and more
- Archives: zip, rar, 7z, tar, gz, iso, and more
Example Output
example_photo.jpg will be moved to /Users/username/Pictures/demo
song.mp3 will be moved to /Users/username/Music/demo
video.mp4 will be moved to /Users/username/Videos/demo
document.pdf will be moved to /Users/username/Documents/demo
Begin sorting? y/n:
Requirements
- Python 3.9+
- No external dependencies (uses only standard library)
Safety Features
- All operations show a preview before execution
- User must explicitly confirm file movements
- Graceful error handling for missing files, permission issues, and OS errors
- Creates destination folders automatically if they don't exist
Development
This project uses Hatchling as the build backend.
Building
python -m build
Future Enhancements
- Recursive folder scanning
- Custom categorization rules
- Configuration file support
- Undo functionality
- Duplicate file handling
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Mon G.
Changelog
0.1.0 (Initial Release)
- Basic file organization by type
- Dry run preview functionality
- User confirmation before file movement
- Support for 100+ file extensions
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 cdhl-0.1.0.tar.gz.
File metadata
- Download URL: cdhl-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae3bc4e907cce7329f4aaba31a86d641730b763e7572d2f16c13098bc7ba8ca2
|
|
| MD5 |
133638f25803f82621989f410e9b7945
|
|
| BLAKE2b-256 |
d4abc46f99c9b656c5dc97e91ef5bc944ff697bb84083a6dadb12a9b3ea0d78f
|
File details
Details for the file cdhl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cdhl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64ac07eab1538c804263c9d9eea7f213d6b184b4e17e1272acac062af35b308d
|
|
| MD5 |
6671dad817b0fc687bbb0f9fa1a87b17
|
|
| BLAKE2b-256 |
d3a1bbc80c18c7ebe5699cf4eaf2134a61139fc9b4e4eaa3d012247ff6e8467e
|