my shell scripting is a tad rusty and I dont have man pages here but
a=0
for x in `ls -1 -r (top level directory)/*.jpg`
do
a++
mv $x (newdirectory)/$x$a.jpg
done
will be on the right track though you may have to snip out the first .jpg with a substr command if that gives you .jpg twice (and I think it will) Im flying by the seat of my pants here but you get the gist yer on a UNIX system (or derivative) use man pages for substr for the syntax
man substr
__________________
Mike South
It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.
|