Skip to main content

FileOrganizer

A Python package that organizes messy files in a folder into categorized subfolders.

Features

  • 📁 Automatically categorizes files based on extension
  • 🏷️ Supports common file types: images, videos, documents, audio, code, archives
  • 🔄 Creates subfolders automatically if they don't exist
  • 🔄 Handles duplicate filenames by adding a suffix (_1, _2, etc.)
  • 📝 Logs all actions (old path → new path) into a log file
  • ↩️ Undo functionality to revert the last organization operation
  • 🧰 Simple command-line interface

Installation

From PyPI

pip install fileorganizer-farhan

From Source

git clone https://github.com/Farhanahmad-kust/fileorganizer.git
cd fileorganizer
pip install -e .

Usage

Command Line Interface

Organize files in a directory:

fileorganizer organize /path/to/messy/directory

Add the -v or --verbose flag for detailed output:

fileorganizer organize /path/to/messy/directory --verbose

Undo the last organization operation:

fileorganizer undo /path/to/organized/directory

As a Python Package

You can also use FileOrganizer in your Python scripts:

from fileorganizer import FileOrganizer

# Initialize the organizer with the target directory
organizer = FileOrganizer("/path/to/messy/directory")

# Organize files
moved_files = organizer.organize()

# Undo the last operation
undone_files = organizer.undo_last_operation()

File Categories

FileOrganizer sorts files into the following categories:

  • images: .jpg, .jpeg, .png, .gif, .bmp, .svg, .tiff, .webp
  • documents: .doc, .docx, .pdf, .txt, .rtf, .odt, .md, .csv, .xls, .xlsx, .ppt, .pptx
  • audio: .mp3, .wav, .flac, .aac, .ogg, .wma, .m4a
  • video: .mp4, .avi, .mov, .wmv, .mkv, .flv, .webm, .m4v
  • code: .py, .js, .html, .css, .java, .c, .cpp, .h, .php, .rb, .go, .rs, .ts, .json, .xml
  • archives: .zip, .rar, .7z, .tar, .gz, .bz2, .xz
  • others: Any file type not listed above

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for fileorganizer-farhan 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fileorganizer-farhan 0.1.1
File Size Uploaded Provenance Actions
fileorganizer_farhan-0.1.1.tar.gz 10.8 kB Without provenance Details for fileorganizer_farhan-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fileorganizer-farhan 0.1.1
File Interpreter ABI Platform Actions
fileorganizer_farhan-0.1.1-py3-none-any.whl Python 3 none any Details for fileorganizer_farhan-0.1.1-py3-none-any.whl

Total release size: 21.7 kB

Release files / fileorganizer_farhan-0.1.1.tar.gz

Download URL fileorganizer_farhan-0.1.1.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
adaa92ad4f98440b9a0ef552e7d20f8e05349ef99989be73f94ea8a5d142b418
BLAKE2b-256 checksum
How to use checksums
25282fbc68968d835816db4769c4684e4b4855b674286b145acc03c7b52339ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Release files / fileorganizer_farhan-0.1.1-py3-none-any.whl

Download URL fileorganizer_farhan-0.1.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb767dd1bb3b203ddc5e4abe394b16434a1cd493af6b2d7b86ff59e414325146
BLAKE2b-256 checksum
How to use checksums
b1178eaa925f9537fa89bc112fd56c115aeeff27a0b12bc01168a8bbc3a0424f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.4

Security for fileorganizer-farhan 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page