#!/bin/bash

# Counter start
counter=1

# Loop through all JPG files sorted alphanumerically
for file in *.jpg; do
    # Create a two-digit padded number
    new_num=$(printf "%02d" $counter)
    
    # New filename
    new_name="img${new_num}.jpg"
    
    # Rename the file
    mv -- "$file" "$new_name"
    
    # Increment the counter
    counter=$((counter + 1))
done

