I'm trying to execute the executable pngout file to compress all images contained in a folder and its subfolder. I'm using a Windows 7 machine. I've tried with the following code:
for %i in (*.png) do pngout "%i" /kp
for /r /d %%x in (*) do (
pushd "%%x"
for %i in (*.png) do pngout "%i" /kp
popd
)
However there is an issue as I get this error:
i" /kp Unexpected
However executing on a single line this command it works (on the current directory):
for %i in (*.png) do pngout "%i" /kp
Any pointers? Thanks!