Jump to content
ElementaryOS France

Recommended Posts

Posted (edited)

Placez vous dans le dossier contenant les images et exécutez le script.

 

#!/bin/bash
nom="Image"
let "indice=1"
for fichier in *.jpg *.JPG *.png *.PNG *.gif *.GIF *.jpeg *.JPEG
do
        if [ -f "$fichier" ]; then
           extension=${fichier##*.}
           echo "$fichier" "=>" "$nom-$indice.$extension"
           mv "$fichier" "$nom-"`printf "%02d" $indice`".$extension"
           let "indice+=1"
       fi
done

Edited by insomniaque

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...