Page 1 of 1
convert multiple files and save to a new directory
Posted: 2012-10-17T14:40:12-07:00
by davidrhicks
How can I convert multiple files and save them to a new directory with the same name? I'm talking hundreds of files. Here is the gist of what I am trying to do:
convert *.tiff -alpha transparent c:\differentDirectory\*.tiff
I know the syntax above is incorrect, but how do I correct it? Or is that even possible?
Re: convert multiple files and save to a new directory
Posted: 2012-10-17T15:22:38-07:00
by fmw42
I do not know that you can have a wild card in both the input or output. There may have been a post by Anthony about that or a possible work around. But the easiest way to do this is to use mogrify. see
http://www.imagemagick.org/Usage/basics/#mogrify
cd path2imagefolder
mogrify -format tiff -alpha transparent *.tiff
Note that will override your input images. So to be safe or to test, use -path
create a new folder, then
cd path2imagefolder
mogrify -path path2newimagefolder -format tiff -alpha transparent *.tiff
Re: convert multiple files and save to a new directory
Posted: 2012-10-18T00:36:12-07:00
by whugemann
By your notation I assume that you are working on a Windows computer, such that
http://www.imagemagick.org/Usage/windows/#for_loops should provide you with the solution.