2

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!

0

1 Answer 1

2

Put your code in a batch file and change the %i terms to %%i

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.