Skip to main content

Python package to automatically organize files by type

Project description

Bulk File Renamer

A simple and efficient Python tool to rename multiple files in a folder automatically using a custom prefix and numbering.


Features

  • Rename files in bulk
  • Automatic numbering
  • Custom prefix support
  • Keeps original file extensions
  • Skips duplicate file names
  • Ignores hidden files
  • Handles edge cases (invalid folder, empty folder)

Installation

Clone the repository:

https://github.com/anuskabhandari/Bulk_file_renamer.git
cd file_renamer

Or install from PyPI:

pip install file-renamer

Usage

Run the program:

python file_renamer.py

Enter inputs:

Enter folder path: test_files
Enter prefix: file

Example (Before & After)

Before Renaming

https://drive.google.com/file/d/1so9-L7PhesLv45y6xH4nzYdEk1QlKBrU/view?usp=sharing

After Renaming

https://drive.google.com/file/d/1mzY2XGfYv9B4Oisgt4P9Y2gvUfc8zfZu/view?usp=sharing


Example Output

img1.jpg → file_1.jpg
img2.png → file_2.png
doc1.pdf → file_3.pdf

Renaming completed!

Edge Cases Handled

  • Invalid folder path
  • Empty folder
  • Duplicate file names (skipped)
  • Hidden files ignored

How It Works

  1. Access folder using pathlib
  2. Read all files
  3. Loop through files
  4. Generate new names using prefix + number
  5. Rename files safely

Author

Anuska Bhandari


License

This project is open-source and available under the MIT License.

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

bulk_renamer_anuska-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

bulk_renamer_anuska-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file bulk_renamer_anuska-0.1.0.tar.gz.

File metadata

  • Download URL: bulk_renamer_anuska-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for bulk_renamer_anuska-0.1.0.tar.gz
Algorithm Hash digest
SHA256 210f77b532cdb29fb908e96a5b59fff28512f19eed7a836b8c4841d86177ae0c
MD5 93211697246b9c7ba0b70f6d80bc2888
BLAKE2b-256 f50c1fec7523366948808bebcfe97f34379d8dc9eb77ce8f413452478111bae5

See more details on using hashes here.

File details

Details for the file bulk_renamer_anuska-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bulk_renamer_anuska-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1795a609d307bd6ce8d315c001c6c9eb1eda152def8a86ef18f5ee284604b180
MD5 532e3f0ada2f3945ed51d4297a266feb
BLAKE2b-256 476b627640de111d5601016f8eb81f99893b383f47fdec5e760ce4c4d88808e2

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