Page 1 of 1

multiple psd[2] to png conversion

Posted: 2010-03-04T10:32:37-07:00
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.

Re: multiple psd[2] to png conversion

Posted: 2010-03-15T09:55:37-07:00
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.