2

I'm trying to capture the stoutput from "call ppm query assert" and if it equals "* no packages installed matching 'assert' **" or better yet contains the string "no packages" do "something" .. being install the package. Any suggestions would be great.. I been scratching my head to long with this. thanks in advance.

:datetime
echo Installing datetime package
call ppm query assert
IF "%OUT%" == "*** no packages installed matching 'assert' ***" (
    echo testtest
::ppm install datetime
pause
) ELSE (
GOTO :win32::api
)

1 Answer 1

3
call ppm query assert | findstr /c:"no packages" >nul && (
  echo package not found
) || (
  echo package found
)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.