On Sat, 4 Dec 2004, Carol Spears wrote:

> > Also could briefly describe how to import multiple images into
> > gimp with the _00X.jpg sequential filenames?
> > 
> i have this problem right now.  to the best of my knowledge, at this
> point there is no way to rename an existing image set like that.
> however, this is the way that images come off from my camera.

 A simple script to do that, provided you have a file containing the name 
of the files in the order you want them, is this:

# Usage: ./script <index filename> <prefix>

for i in $(seq -w 1 $(sed -e '/^$/d' $1 |wc -l | sed -e 's/ *\([^ ][^ ]*\) 
.*/\1/')); do
        mv `head -$i $1 | tail -1` $2_$i.jpg

The index file should have one filename per line.

 This script was created in 1-2 minutes, with minimal testing. Use with 

Gimp-user mailing list

Reply via email to