I am trying to create a batch file that process all jpgs in multiple subdirectories of certain folder.
It looks like this:
Code: Select all
cd C:\codigo2\
for /r /d %%a in (*) do mogrify -fuzz 30% -trim "%%~a\*.jpg"
pause
for /r /d %%a in (*) do mogrify -resize 1000x5000 "%%~a\*.jpg"
for /r /d %%a in (*) do mogrify -gravity center -extent 1115x5000 "%%~a\*.jpg"
pause

Do you know how to tell windows I am trying to pass multiple parameters with hyphens?The following usage of the path operator in batch-parameter substitution is invalid: %~a*.jpg"
This code works perfectly, is the added -fuzz 30% that breaks it.
Code: Select all
cd C:\codigo2\
for /r /d %%a in (*) do mogrify -trim "%%~a\*.jpg"
pause
for /r /d %%a in (*) do mogrify -resize 1000x5000 "%%~a\*.jpg"
for /r /d %%a in (*) do mogrify -gravity center -extent 1115x5000 "%%~a\*.jpg"
pause
Code: Select all
mogrify -fuzz 30% -trim "image.jpg"
Best regards!