A simple Python automation script that automatically renames all files in a chosen folder while keeping their original file extensions.
This version is interactive, meaning you just enter the folder path when you run it — no code editing needed.
- Renames all files in any selected folder
- Keeps original file extensions (.txt, .jpg, .pdf, etc.)
- Skips subfolders and hidden files
- Asks before performing any renaming (safe confirmation)
- Simple, clean console interface with user prompts
- No external libraries required
The script uses Python’s built-in os module to:
- Ask you to enter a folder path
- Check if the folder exists and list all files inside it
- Split each filename into name and extension
- Rename each file sequentially (e.g., renamed_0.txt, renamed_1.pdf, etc.)
- Show progress and confirmation for every renamed file
- Language: Python 3
- Libraries: os (built-in, no installation needed)
- Clone this repository:
git clone https://github.com/RajveerBuilds/File-Renamer.git
- File Renamer Automation Script This script renames all files in a folder while keeping their extensions.
👉 Enter the full folder path: C:\Users\Rajveer\Desktop\testfolder
Found files in 'C:\Users\Rajveer\Desktop\testfolder':
- notes.pdf
- photo.txt
- video.jpg
Proceed with renaming? (y/n): y notes.pdf -> renamed_0.pdf photo.txt -> renamed_1.txt video.jpg -> renamed_2.jpg
✅ All files renamed successfully!
- Add undo feature
- Build a GUI version
Rajveer Jaiswal
First-year Software Engineering student at NIAT Jaipur
Learning automation, AI, and real-world software development.