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
-
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
-
File renaming: The script renames files in a directory with a specified prefix and sequential numbers.
-
Deleting empty folders: The script will delete all empty folders and sub-folders for a given directory.
Usage
- 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.
- 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.
- 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:
- Check the existing issues to see if it has already been reported.
- 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:
- Fork the repository
- Create a new branch (
git checkout -b feature/YourFeatureName) - Make your changes
- Commit your changes (
git commit -m 'Add some feature') - Push to your branch (
git push origin feature/YourFeatureName) - Open a Pull Request against the
mainbranch
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
Metadata
Release files for batch-work 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| batch_work-0.2.3.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| batch_work-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / batch_work-0.2.3.tar.gz
| Download URL | batch_work-0.2.3.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
972d2b9201f1ea41f5ffd2b51c43f07474c2a0da8c0f5c622568c2f55938e695
|
|
BLAKE2b-256 checksum How to use checksums |
510290f3b0934b07882a325646b19851c997638509820242f304d152fac1e2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / batch_work-0.2.3-py3-none-any.whl
| Download URL | batch_work-0.2.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3361d6eb21a11573b380e4cf6eaf4af9c07b476a4151950ad98be13d4f540ee6
|
|
BLAKE2b-256 checksum How to use checksums |
09f574711b90f20600a73ff0f5e5f40020d28d3827c3ea17ca5841609e42ef97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|