#1 Le 06/02/2013, à 17:43
- paeschli
[RESOLU] Renommer plusieurs fichiers avec mv
Bonjour, j'ai un grand nombre d'images dans un répertoire et je me demandais si c'était possible de tous les renommer d'un coup avec la commande mv ou rename.
Si je veux par exemple renommer toutes les photos de IMG_3670.JPG à IMG_3773.JPG en france1, france 2 ... je fais comment?
Merci d'avance
Dernière modification par paeschli (Le 06/02/2013, à 17:56)
Intelligence is the ability to avoid doing work, yet getting the work done. - Linus Torvalds
Hors ligne
#2 Le 06/02/2013, à 17:51
- pingouinux
Re : [RESOLU] Renommer plusieurs fichiers avec mv
Bonjour,
n=0;for i in IMG_{3670..3773}.JPG; do mv -i "$i" france$((++n)).JPG; done
Hors ligne
#3 Le 06/02/2013, à 17:56
- paeschli
Re : [RESOLU] Renommer plusieurs fichiers avec mv
Ah merci beaucoup pour la réponse rapide
Intelligence is the ability to avoid doing work, yet getting the work done. - Linus Torvalds
Hors ligne