Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Rename files with increment

__/ [ Lionel Allorge ] on Wednesday 19 July 2006 14:45 \__

> Hi,
> 
> I would like to rename automatically the files in a directory with an
> increment. For example from foo_0001.jpg to foo_xxxx.jpg.
> 
> Any idea ?
> 
> Regards.
> 
> --
> Lionel Allorge
> Email : lionel.allorge@xxxxxxxxxxxxx
> Lune Rouge : http://www.lunerouge.org

Here is a bash template you may find useful. I wonder if you meant to convert
from foo.jpg to foo_0001.jpg (you only described the range).

for file in ls *.jpg
 do
  echo ${file}
  mv ${file} ${file}ADD_NUMBER_VARIABLE.jpg
done

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index