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."
(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
- Ensure you have Python 3.6+ installed
- Clone this repository or download the script:
git clone https://github.com/karvanpy/orgnized-cli.git
cd orgnized-cli
- (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
- Organize files (copy mode - keeps originals):
./orgnized-cli.py ~/Downloads
- Organize files by moving them (deletes originals):
./orgnized-cli.py ~/Downloads --delete
- Preview what would happen (dry-run mode):
./orgnized-cli.py ~/Downloads --dry-run --verbose
- 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
- You specify a directory to organize
- The tool analyzes files and shows what changes it will make
- You confirm the operation
- 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
- Provides a summary of actions taken
Contributing
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch ("git checkout -b feature/your-feature")
- Commit your changes ("git commit -am 'Add some feature'")
- Push to the branch ("git push origin feature/your-feature")
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc77eec8379e495f6c2e56c9c85146858ccc5e4b36c49cb4af0bf5bf16b9009
|
|
| MD5 |
9474581f5297d462feda2432c3fb720e
|
|
| BLAKE2b-256 |
b547cb72a81e4a0761dc786c99f0e2ccb8fe277d2d4565f9944de03d6e65a1e5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29159fcf5f421cffa6247456c30b3c1f2b467ac83165f8850af234d1c8eeef8
|
|
| MD5 |
f892a547011fbbef41d389892b1a15e0
|
|
| BLAKE2b-256 |
88dc23013a1ff5574c82c8d94214b7afb6d81127fc6b610f53d5cc18fbfd892f
|