multiple psd[2] to png conversion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
foad
Posts: 1
Joined: 2010-03-04T10:15:35-07:00
Authentication code: 8675308

multiple psd[2] to png conversion

Post by foad »

Hi;
I trie to extract the layer 2 from 750 images folder and convert it to png format.

I suceed to convert psds to png with all layers, but not just my image layer…

Here's my script:

#!/bin/sh
for i in *.psd\[2\]; do convert "${i}" "${i%%.*}.png"; done

What is my mistake ?
Thank you !
Ad.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: multiple psd[2] to png conversion

Post by fmw42 »

#!/bin/sh
for i in *.psd\[2\]; do convert "${i}" "${i%%.*}.png"; done

try leaving off the \ escapes

for i in *.psd[2]; do convert "${i}" "${i%%.*}.png"; done

I am not sure what you are trying to do with %%?

If this does not work, try leaving off the %% or just do one image outside the loop to test whether that works before putting it in a loop.
Post Reply