Skip to main content

A command-line tool for organizing files by type

Project description

Organized CLI

"A command-line tool to automatically organize files in a directory by their types."

Demo Screenshot (optional: add actual screenshot later)

Features

  • Automatically categorizes files by extension (documents, images, videos, etc.)
  • Creates organized folder structure with configurable prefix
  • Supports both copy (default) and move (--delete) modes
  • Multiple conflict resolution strategies (rename, skip, overwrite)
  • Dry-run mode to preview changes
  • Detailed statistics and error reporting
  • User confirmation before making changes
  • Handles edge cases (permissions, existing folders, etc.)

Installation

  1. Ensure you have Python 3.6+ installed
  2. Clone this repository or download the script:
git clone https://github.com/karvanpy/orgnized-cli.git
cd orgnized-cli
  1. (Optional) Make the script executable:
chmod +x orgnized-cli.py

Other way

You can install using pip or pipx -> pip install orgnized-cli or execute directly without installation via uvx orgnized-cli

Usage

Basic syntax:

./orgnized-cli.py [DIRECTORY] [OPTIONS]

Examples

  1. Organize files (copy mode - keeps originals):

./orgnized-cli.py ~/Downloads

  1. Organize files by moving them (deletes originals):

./orgnized-cli.py ~/Downloads --delete

  1. Preview what would happen (dry-run mode):

./orgnized-cli.py ~/Downloads --dry-run --verbose

  1. Custom folder prefix and conflict handling:

./orgnized-cli.py ~/Downloads --prefix "sorted_" --conflict skip

Options

Option Description
--delete Move files instead of copying (deletes originals)
--dry-run Preview changes without actually making them
--verbose Show detailed output of operations
--prefix TEXT Prefix for organized folders (default: "orgz")
--conflict How to handle conflicts: "rename" (default), "skip", or "overwrite"

Supported File Types

The tool organizes these file categories by default:

  • Images: .jpg, .jpeg, .png, .gif, .bmp, .tiff, .webp, .svg, .heic, .raw
  • Documents: .pdf, .doc, .docx, .txt, .rtf, .odt, .xls, .xlsx, .ppt, .pptx, .md
  • Audio: .mp3, .wav, .flac, .aac, .ogg, .m4a, .wma, .opus
  • Video: .mp4, .avi, .mkv, .mov, .wmv, .flv, .webm, .m4v, .3gp
  • Archives: .zip, .rar, .7z, .tar, .gz, .bz2, .xz, .iso
  • Code: .py, .js, .html, .css, .java, .cpp, .h, .php, .rb, .sh, .pl
  • Data: .csv, .json, .xml, .yaml, .yml, .sql, .db
  • Executables: .exe, .msi, .dmg, .pkg, .deb, .rpm, .apk
  • Fonts: .ttf, .otf, .woff, .woff2, .eot

Files with unknown extensions go to "Other" category.

How It Works

  1. You specify a directory to organize
  2. The tool analyzes files and shows what changes it will make
  3. You confirm the operation
  4. The tool:
    • Creates category folders (if they don't exist)
    • Copies or moves files to appropriate folders
    • Handles naming conflicts based on your preference
    • Preserves file metadata when copying
  5. Provides a summary of actions taken

Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch ("git checkout -b feature/your-feature")
  3. Commit your changes ("git commit -am 'Add some feature'")
  4. Push to the branch ("git push origin feature/your-feature")
  5. Open a Pull Request

License

MIT License. See LICENSE file for details.

Support

If you find this tool useful, consider starring the repository! For issues or feature requests, please open an issue on GitHub.

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

orgnized_cli-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

orgnized_cli-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file orgnized_cli-0.1.0.tar.gz.

File metadata

  • Download URL: orgnized_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for orgnized_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fdc77eec8379e495f6c2e56c9c85146858ccc5e4b36c49cb4af0bf5bf16b9009
MD5 9474581f5297d462feda2432c3fb720e
BLAKE2b-256 b547cb72a81e4a0761dc786c99f0e2ccb8fe277d2d4565f9944de03d6e65a1e5

See more details on using hashes here.

File details

Details for the file orgnized_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orgnized_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for orgnized_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f29159fcf5f421cffa6247456c30b3c1f2b467ac83165f8850af234d1c8eeef8
MD5 f892a547011fbbef41d389892b1a15e0
BLAKE2b-256 88dc23013a1ff5574c82c8d94214b7afb6d81127fc6b610f53d5cc18fbfd892f

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