1

I have a very simple batch script.

Start "" "C:\Game.exe"

If Game.exe does not exist, it will show an error message that there is no game.exe. I want to skip such messages, I mean if game.exe exists it runs it and if no nothing.

How to do it?

2 Answers 2

3
if exist "C:\Game.exe" Start "" "C:\Game.exe"
Sign up to request clarification or add additional context in comments.

Comments

2

For example like this:

if not exist "C:\Game.exe" goto ERROR1

Start "" "C:\Game.exe"

:ERROR1

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.