У меня есть один код
Код: chcp 1251
for /f "delims=" %%i in ('dir /b /s /a-d Images\*.png') do (
Rem pngcrush -rem alla -brute -reduce src.png dest.png
optipng.exe -o7 "%%~fi"
advdef.exe -z -4 "%%~fi"
deflopt.exe "%%~fi"
pngout.exe "%%~fi"
advdef.exe -z -4 "%%~fi"
deflopt.exe "%%~fi"
)
for /f "delims=" %%i in ('dir /b /s /a-d Images\*.jpg Images\*.jpeg') do (
Rem jpegtran -copy none -progressive "%%~fi" "%%~fi"
Rem jpegtran -copy none -optimize "%%~fi" "%%~fi"
jhead -purejpg "%%~fi"
)
Код: chcp 1251
for /f "delims=" %%i in ('dir /b /s /a-d Images\*.png') do (
Rem pngcrush -rem alla -brute -reduce src.png dest.png
optipng.exe -o7 "%%~fi"
advdef.exe -z -4 "%%~fi"
deflopt.exe "%%~fi"
pngout.exe "%%~fi"
advdef.exe -z -4 "%%~fi"
deflopt.exe "%%~fi"
)
for /f "delims=" %%i in ('dir /b /s /a-d Images\*.jpg Images\*.jpeg') do (
Rem jpegtran -copy none -progressive "%%~fi" "%%~fi"
Rem jpegtran -copy none -optimize "%%~fi" "%%~fi"
jhead -purejpg "%%~fi"
)