ID: 317
Category: Bash Scripts
Added: 27th of August 2022
Updated On: Tutorial updated and rechecked on 22nd of November 2023
Views: 1,318
The following bash script renames all .jpg images inside a folder with sequential numbers, for example 1.jpg, 2.jpg, 3.jpg......
If you are using a different image format such as .jpeg, .png, .gif just change the code at the start of the for loop, for example for i in *.png if your folder contains .png images.
If this is your first time creating a bash script please visit my other tutorial Create a simple bash script
Copy and past the code below in to your text editor, save the file as rename_images.sh