I have come across this problem before but now it is more prevalent than ever;
Here is a quick example of what i'm trying to achieve
Code: Select all
SET IMDIR=C:\Program Files\ImageMagick-6.5.1-Q16
SET APP=mogrify.exe
SET OPTS=-format tga *.dds
REM mogrify Usage:
REM mogrify -format tga *.dds
CD D:\DDS_TEMP
"%IMDIR%\%APP%" %OPTS%
PAUSE
I know what this means because i've had to workaround it before... But now instead of a workaround (would takes hours to code) i would like to know how to process multiple sub folders with ONE line of command instead of 'CD'ing or 'PUSHD'ing to each folder that has images directly in it.mogrify.exe: unable to open image `*.dds': No such file or directory @ blob.c/OpenBlob/2439.
mogrify.exe: unable to open image `*.dds': Invalid argument @ blob.c/OpenBlob/2439.
For example, the directory DDS_TEMP has more than 5000 dds materials in it with folders in folders in folders, all i want to do is use the "-format tga *.dds" option to convert them all to TGA (with output images in the source directory they came from)
I've searched the forum, looked through the Usage examples and documentation with no avail.
Here is my workaround that i DO NOT want to use...
Code: Select all
PUSHD D:\DDS_TEMP\Game\UI\HUD1
"%IMDIR%\%APP%" %OPTS%
POPD
PUSHD D:\DDS_TEMP\Game\UI\HUD2
"%IMDIR%\%APP%" %OPTS%
POPD
PUSHD D:\DDS_TEMP\Game\UI\HUD3
"%IMDIR%\%APP%" %OPTS%
POPD
PUSHD D:\DDS_TEMP\Game\UI\HUD4
"%IMDIR%\%APP%" %OPTS%
POPD
Also IM is the only program that can properly convert a DDS texture into a 32bpp TGA and not destroy the Alpha channel, programs like ImageConverterPlus destroys the Alpha channel which renders most of the textures useless (Also the aforementioned program does not write to 32bpp TGA files)
Any help is greatly appreciated and will save alot of time on pretty pointless coding imo.
Thanks in advance, Jenkins