[magick-users] recursive mogrify operations

Carl Karsten carl at personnelware.com
Wed Dec 26 11:06:55 PST 2007


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.
> 

Use the find command, which is installed on most Linux and has been ported to 
win: http://unxutils.sourceforge.net - dl link: 
http://sourceforge.net/project/showfiles.php?group_id=9328

to get you started, you are going to want something like this:

find /start/dir -name "*.png" -exec mogrify -stuff {} \;

or, CD into the start dir, and use echo to see what commands are goint to get 
executed. once it looks like it is what you want, then you can actually execute.

carl at asus17:~$ find ./ -name "*.png" -exec echo mogrify -stuff {} \;
mogrify -stuff ./wifi/carlfloorplan.png
mogrify -stuff ./wifi/floorplan.png
mogrify -stuff ./wifi/lewifi/crownmeetrooms.png

Carl K


More information about the Magick-users mailing list