Skip to main content

CLI tool to organize and rename files.

Project description

batch-work: A Tool to Organize and Rename File

Introduction

This is a command-line utility tool written in Python that helps you organize and rename files in a directory. It sorts files into different folders based on their file extensions and renames files with a specified prefix.

Features

  1. File sorting: The script sorts files into the following categories:

    • Image files (.jpg, .png, .gif, etc.)
    • Audio files (.mp3, .wav, .flac, etc.)
    • Video files (.mp4, .avi, .mov, etc.)
    • Document files (.pdf, .doc, .txt, etc.)
    • Other files
  2. File renaming: The script renames files in a directory with a specified prefix and sequential numbers.

  3. Deleting empty folders: The script will delete all empty folders and sub-folders for a given directory.

Usage

  1. File sorting: To organize files in a directory by type:
    bw_sort <directory_path>
    

Replace <directory_path> with the target directory path. It's recommended to run this command from the parent directory.

  1. File renaming: To add a prefix to all files in a directory:
    bw_rename <prefix> <directory_path>
    

Replace with the desired prefix and <directory_path> with the target directory path. It's recommended to run this command from the parent directory.

  1. Deleting empty folders: To remove all empty folders within a specified directory:
    bw_delempty <directory_path>
    

Replace <directory_path> with the path to the parent directory you want to clean up.

Installation

Recommended method: Install the latest version:

```bash
pip install batch-work
```

Or install from Github:

```bash
pip install https://github.com/UgyenNorbu/batch-work/releases/download/v0.1.1/batch_work-0.1.2.tar.gz
```

Dependencies

Package tree is required. Install the latest version:

```bash
pip install tree
```

Contributing

We appreciate your interest in contributing to the batch-work project. Your contributions can help improve this tool for everyone. Here's how you can get involved:

Reporting Issues

If you encounter any bugs or have suggestions for improvements:

  1. Check the existing issues to see if it has already been reported.
  2. If not, open a new issue, providing as much detail as possible:
    • Steps to reproduce the bug
    • Expected vs. actual behavior
    • Your environment (OS, Python version, etc.)
    • Any relevant screenshots or error messages

Submitting Changes

To contribute code or documentation:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/YourFeatureName)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add some feature')
  5. Push to your branch (git push origin feature/YourFeatureName)
  6. Open a Pull Request against the main branch

Questions or Suggestions

For general questions or suggestions about the batch-work project, please open a new discussion in our GitHub Discussions area.

License

This project is licensed under the MIT License - see the LICENSE file for details.

TODO

  • Find dublicate files and delete

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

batch_work-0.2.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

batch_work-0.2.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file batch_work-0.2.2.tar.gz.

File metadata

  • Download URL: batch_work-0.2.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for batch_work-0.2.2.tar.gz
Algorithm Hash digest
SHA256 205bb60f46eff1d84ad173a8bcdec53c2cdbe2204a26ab9bd4ec6a05e44d5459
MD5 3073c980b44de73e95737596e99a3fae
BLAKE2b-256 748e23dbab742b10d6e0a4ed4c8b99281236ad4c26aedb2a5823ad7f3cac9d35

See more details on using hashes here.

File details

Details for the file batch_work-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: batch_work-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for batch_work-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 84512b16a8cfbc09f18ec86a2b3ff59b98160651107f8b034db222751e965174
MD5 c12c213e9344518746eb1efdd6fcd3d8
BLAKE2b-256 c89ad308b20861864d44173f254a50800b0a57c80162c6a784e331e6238c93b8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page