Skip to main content

A Python package to organize files by type.

Project description

File Organizer Pro

Overview

File Organizer Pro is a Python package designed to organize files in a specified directory by their types, such as images, documents, videos, and more.

Features

  • Organizes files by type into subfolders.
  • Supports custom rules for file categorization.
  • Preview mode to show how files will be organized.
  • Recursive organization for subdirectories.

Installation

You can install the package using pip:

pip install file-categorizer

Usage

Here is an example of how to use the package:

from file_organizer_pro.organizer import organize_files_by_type, organize_recursively, preview_organization, custom_rules

# Test a directory path (make sure this path exists)
test_path = 'C:/path/to/your/test/folder'

# Organize files by type
organize_files_by_type(test_path)

# Organize files recursively
organize_recursively(test_path)

# Preview how files will be organized
preview_organization(test_path)

# Define custom categorization rules
rules = {
    'Images': ['.jpg', '.jpeg', '.png'],
    'Documents': ['.pdf', '.docx', '.txt']
}

# Organize files based on custom rules
custom_rules(test_path, rules)

Functions

organize_files_by_type(path) Organize files in the specified directory by type (e.g., images, documents).

organize_recursively(path) Recursively organize files in the specified directory and all its subdirectories.

preview_organization(path) Preview the file organization in the specified directory without actually moving files.

custom_rules(path, rules_dict) Organize files based on custom user-defined rules. The rules_dict should map folder names to lists of 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

file-categorizer-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

file_categorizer-0.1.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file file-categorizer-0.1.3.tar.gz.

File metadata

  • Download URL: file-categorizer-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for file-categorizer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 74b3a38ba6278858bd95165a745aeb9b85784c7fff19eab6cd2366ec0e1d174f
MD5 2ed87dd6e7604be41f2a3a64d430a81b
BLAKE2b-256 9bf4e74a2e3442330e9b57775cea46da61b3af6a367731caef9ef4ce7794adcd

See more details on using hashes here.

File details

Details for the file file_categorizer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for file_categorizer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ee1d94eb684b506e9609cd6d9b85ded6619682a422d4fe4085af136bad41dca1
MD5 024fb733e2b484a484946b824d7ac226
BLAKE2b-256 43bd739433b1603e7fc4118f89f1e29b0b00e6c73d8d36407ac5abe1b39abca3

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