Skip to main content

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:

  1. Scan your Downloads folder
  2. Show a preview of where each file will be moved
  3. Ask for confirmation
  4. 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
song.mp3 will be moved to /Users/username/Music
video.mp4 will be moved to /Users/username/Videos
document.pdf will be moved to /Users/username/Documents

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdhl-0.1.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdhl-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file cdhl-0.1.2.tar.gz.

File metadata

  • Download URL: cdhl-0.1.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for cdhl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 08de6e6cc3c52857dddf61b2c42a9977940819218812991d2f4c7a90cdc726da
MD5 55a450d2d42cbccee926a8d984c7f9e6
BLAKE2b-256 636d2458799b8b5e77e1b0b56776489fdb80e03c177bc773eaef9162ea910c31

See more details on using hashes here.

File details

Details for the file cdhl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cdhl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for cdhl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6c10297a6b5d9469035bc3ea4eaa416ae225aa9df69481e774dd09212325b3
MD5 cb3d6e80f1c4412ffd9ac513c8f05573
BLAKE2b-256 5ec44ade8b817e04916b1730f57307a4af8ad022504845a96dc833aae6f845fb

See more details on using hashes here.

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