A simple yet powerful batch utility to sequentially rename photo files in a folder from 1 to N.
Photo Renamer Tool automatically renames all image files in a folder with sequential numbers (1.jpg, 2.jpg, 3.jpg, etc.), making it easier to organize and sort your photo collection.
- Sequentially renames all photos in a folder (1, 2, 3, etc.)
- Supports multiple image formats (JPG, PNG, JPEG) in both lowercase and uppercase
- Uses a two-pass system to ensure no file conflicts during renaming
- Simple user interface with progress feedback
- No installation required - just a single batch file
- Place the
photo-renamer-tool.bat
file in the folder containing your photos - Double-click the batch file to run it
- All photos will be renamed sequentially starting from 1
Windows may display a security warning when running this batch file as it's not signed by a recognized certificate authority. This is normal for any script downloaded from the internet.
To reduce security warnings, you can:
- Right-click the batch file
- Choose "Properties"
- Check the "Unblock" box (if present)
- Click "OK"
- Right-click on
sign-script.ps1
- Choose "Run with PowerShell as Administrator"
- This will create a self-signed certificate and sign the batch file
The script works in two phases:
- First pass: All image files are renamed to temporary names (temp_1000000.jpg, etc.) to avoid conflicts
- Second pass: The temporary files are renamed to their final sequential numbers (1.jpg, 2.jpg, etc.)
@echo off
:: Photo Renamer Tool
:: Renames all image files in the current folder sequentially from 1 to N
setlocal enabledelayedexpansion
:: First pass - rename to temporary names
set tempcount=1000000
for %%f in (*.jpg *.png *.jpeg *.JPG *.PNG *.JPEG) do (
ren "%%f" "temp_!tempcount!%%~xf"
set /a tempcount+=1
)
:: Second pass - rename to final names
set count=1
for %%f in (temp_*.jpg temp_*.png temp_*.jpeg temp_*.JPG temp_*.PNG temp_*.JPEG) do (
ren "%%f" "!count!%%~xf"
set /a count+=1
)
This project is available as open source under the terms of the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
July 16, 2025