DhanushNehru / Python-Scripts

A curated list of python scripts for automating your tasks
https://dhanushnehru.github.io/Python-Scripts/
MIT License
551 stars 259 forks source link

File Renamer Script #340

Open max-lopzzz opened 1 month ago

max-lopzzz commented 1 month ago

Is your feature request related to a problem? Please describe. I often have a batch of files that need to be renamed according to a specific pattern, but manually renaming each file is tedious and error-prone.

Describe the solution you'd like I would like to contribute a FileRenamer.py script that allows users to rename multiple files in a directory based on a provided regex pattern. Users can specify the new name format, and the script will rename the matching files accordingly.

Describe alternatives you've considered I considered using file management software that includes batch renaming features, but many of these tools have a steep learning curve or don't support regex patterns for flexible renaming.

Additional context The script prompts the user for the directory, the search pattern, and the new name. This will be useful for users needing to standardize file names or organize files in a consistent manner.