Batch command for ImageMagick to convert all files in a directory and sub-directories on windows
you don't need shell scripting just use the mogrify
command
cd to your image directory
mogrify -format png *.svg
Try with a FOR
loop with /R
flag from inside your root folder:
FOR /R %a IN (*.svg) DO convert "%~a" "%~dpna.jpg"
this command will convert all the .svg
files in your sub-directories under the root folder you launched your command from.
Above command works for command line, if you plan to use the command inside a batch file (.bat) remember to use %%
instead of %
:
FOR /R %%a IN (*.svg) DO convert "%%~a" "%%~dpna.jpg"
See this page of Imagemagick documentation for more info