On Wednesday 26 December 2007 06:24, Vedran Vucic wrote:
> Hello,
>
> I want to do massive  mogrify  actions on large hard disk with
> many subfolders.
> I have to do that in Windows XP.
> How can I do that recursively so one command can perform mogrify in all
> subfolders-
>
> Advice for Linux is welcome too.

Assuming there's NOTHING but images in the directories....
find [directory] -type f | xargs mogrify [mogrify options]

examples:
find ppm -name "*gif" |xargs mogrify -strip
find people -name "*jpeg" | xargs mogirfy -geometry 600x600


Now, if you have Cygwin installed on your windos computer, just fire up a 
shell and the commands should be the same.

If you have spaces in the names of files, then you need to do a few things 
differently...you'll need to read the man page for xargs to get the details, 
but basically you need to add -print0 to the find, and -0 right after the 
xargs.

If you're doing something more complex like changing all the files named .gif, 
yet saved as JPEG's.... different options to xargs.
find football -name "*square.gif" |xargs -i convert \{\} jpeg:\{\}

This will maintain the filename to be the same, but the internal structure is 
now a JPEG.

good luck,
brian

-- 
Brian Jackson
Action Athletics Sports Photography
http://www.ActionAthletics.com/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to