My Computer Tips was launched in 2015 and provides information for common tasks in various Linux distributions and other computer related subjects.
My Computer tips has over 290 tutorials and tips.
If you found the information on My Computer Tips useful, please consider sharing our site details.
ID: 317
Category: Bash Scripts
Added: 27th of August 2022
Updated On: Tutorial updated and rechecked on 22nd of November 2023
Views: 1,759
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
Linux Forums
Linux Gaming
Other Linux / Computer Sites
Other Sites / Shopping