Four-file preview
- Example
IMG 001.JPG summer/photo 02.png download (3).webp Photo.JPG- Result
image-001.jpg image-002.png image-003.webp image-004.jpg
The summer/ path on the second line is stripped; only the final filename and extension are used.
Preview how filenames with spaces, brackets, and mixed case can be renamed into web-server-safe names.
Paste multiple filenames to generate safe rename candidates. It does not modify real files.
These examples show how numbering and extensions are normalized when inputs contain paths, spaces, and uppercase letters.
IMG 001.JPG
summer/photo 02.png
download (3).webp
Photo.JPGimage-001.jpg
image-002.png
image-003.webp
image-004.jpgThe summer/ path on the second line is stripped; only the final filename and extension are used.
prefix 여행 · start 8file-008.jpgThe current rule allows ASCII letters and numbers in generated prefixes. This limitation is now stated explicitly.
A bulk rename destroys the original names the moment it runs. One wrong rule tangles hundreds of files with no way back. So the order is always the same - check the plan, back up, then execute.
Paste file names into the box above and a before → after table appears instantly. Each candidate combines the sanitized prefix, a unique sequence number and the original extension. If an input includes a path, only its final filename is used. No actual files are touched.
Copy the whole folder first and you can always undo.
cp -r ~/photos ~/photos_backup # full copy (change the path)
The script below does not rename anything - it only prints the commands it would run. Review the output, then delete the # on the last mv line and run it again for real.
cd ~/photos
n=1
for f in *.jpg; do
printf -v num '%03d' "$n" # 001, 002... zero-padded
new="${num}-trip.jpg"
echo mv "$f" "$new" # preview only for now
# mv "$f" "$new" # verified? remove # and rerun
n=$((n+1))
done