How to rename a long list of photo filenames?

Deepak Saxena dsaxena at plexity.net
Tue Nov 8 18:53:00 MST 2005


On Nov 08 2005, at 18:25, Josef Lowder was caught saying:
> Also, I'd like to be able to globally make thumbnails of 
> each photo with the same name but with an added letter "t" 
> preceding the .jpg 

Install imagemagick.

Thumbnails:

for file in `ls *.jpg`
do
	thumbfile=`echo $file | sed s/.jpg/t.jpg`
	convert --resize 320x240 $file $thumbfile
done

For the renaming, you need to add some rules to conver to the
appropriate format based on the name, but that shouldn't be too hard.

~Deepak

-- 
Deepak Saxena - dsaxena at plexity.net - http://www.plexity.net

When law and duty are one, united by religion, you never become fully
conscious, fully aware of yourself. You are always a little less than
an individual. - Frank Herbert


More information about the PLUG-discuss mailing list