Rename multiple files at once
Me - Atlantic
jdangler at atlantic.net
Thu Apr 6 22:06:53 UTC 2006
Setup a script file in your favorite script lang...
set a variable for a unique prefix or suffix or other identifier
set a variable for the source dir of the images
set a variable for the target dir of the images
set a variable for each of the image types you want
then do --
for word in `ls $src/*.$imgtyp
do
zip $word && mv $word $dest/$newname (or bzip or gzip)
done
exit 0;
On Thu, 2006-04-06 at 21:29 +0100, Zunflappie wrote:
> Ronny Haryanto Wrote:
> > Originally Posted by Ronny Haryanto0 $img; done
>
> > On Sunday 15 January 2006 03:17, 'Forum Post, '@wailuku.xlogicgroup.com
> > wrote:
>
> > > Gimp works, but i have to do it picture for picture.
>
> > >
>
> > > I have 64 images to go.... i dont like the idea that i have to do 50
>
> > > images next week again..... so i am searching for the batch-method.
>
> > >
>
> > > I can resize, but not a group of images.
>
> >
>
> > If you have imagemagick installed, you can cook a short bash script
> > utilising
>
> > 'mogrify', like so (adjust seasoning to your liking):
>
> >
>
> > for img in *.jpg; do echo $img; mogrify -resize 640x480 $img; done
>
>
>
> The last line on the message above.
>
> It works GREAT!!!
>
> Really good!!!!
>
>
>
> But the new images arent 'compressed' .... they are 100kb each, while
> 50 is normal.
>
> In mogrify -help i found the function * -compress type * but that
> doenst decrease the size.
>
> How can i do it automatic (using the Terminal-rule above)?
>
>
>
> Just starting Linux-terminal-patient....
>
> (with bad english ;))
>
>
> --
> Zunflappie
>
More information about the ubuntu-users
mailing list