Skip to content

pyorganize is a lightweight Python library and CLI tool that automatically organizes files in a directory based on file type. It supports both programmatic usage and command-line execution for quick, hassle-free cleanup. Designed to be beginner-friendly, extensible, and open for community contributions.

License

Notifications You must be signed in to change notification settings

KaranUnique/pyorganize

Repository files navigation

pyorganize: Smart File Organizer

pyorganize is a Python library and CLI tool to automatically organize files in your directories by type. It helps keep your folders clean by sorting files into categories like Images, Documents, Videos, Music, Archives, and more.


Features

  • Organize files in any folder by type
  • Supports Images, Documents, Videos, Music, Archives, and more
  • Easy-to-use CLI and Python API
  • Customizable rules and presets
  • Extensible for your own file types

Installation

pip install pyorganize

Usage

As a Python Library

from pyorganize import organize

organize("/path/to/your/folder")

As a CLI Tool

pyorganize <folder_path>
# Example:
pyorganize ~/Downloads

How It Works

Files are moved into subfolders based on their extension:

  • Images: .jpg, .jpeg, .png, .gif
  • Documents: .pdf, .docx, .txt, .xlsx
  • Videos: .mp4, .mkv, .avi
  • Music: .mp3, .wav
  • Archives: .zip, .rar
  • Others: Everything else

You can customize these rules in the code or extend them for your needs.


Example

from pyorganize import organize

organize("Downloads")

Customization

You can add your own file type rules by editing pyorganize/core/file_types.py or by contributing new rules in pyorganize/rules/.


Contributing

We welcome contributions! See docs/contributing.md for guidelines.


License

MIT License

About

pyorganize is a lightweight Python library and CLI tool that automatically organizes files in a directory based on file type. It supports both programmatic usage and command-line execution for quick, hassle-free cleanup. Designed to be beginner-friendly, extensible, and open for community contributions.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages