Search found 3 matches

by evandaviswilliams
11 Sep 2017 13:40
Forum: DOS Batch Forum
Topic: When can I use && and || syax?
Replies: 8
Views: 15858

Re: When can I use && and || syax?

The "return value" (aka "exitcode") and "errorlevel" (aka "process exit code") are two different things Indeed, and you could use them to return different values. http://www.dostips.com/forum/viewtopic.php?f=3&t=5826 (Although it's a little off-topic here...
by evandaviswilliams
11 Sep 2017 13:01
Forum: DOS Batch Forum
Topic: When can I use && and || syax?
Replies: 8
Views: 15858

Re: When can I use && and || syntax?

you can also use call: call ErrorReturn.cmd && ECHO Success call ErrorReturn.cmd || ECHO Failure With call a new context/thread of the cmd is created and when it finishes and the flow is returned to the parent context the errorlevel is returned. If you put the " ErrorReturn.cmd &&a...
by evandaviswilliams
10 Sep 2017 18:07
Forum: DOS Batch Forum
Topic: When can I use && and || syax?
Replies: 8
Views: 15858

When can I use && and || syax?

Hi everyone, first post here on these forums. Been teaching myself Batch for the past month or so Right now, I'm running through Steve Jansen's Batch tutorial here: m I'm curious about when exactly I can use the && and || syntax, specifically to evaluate the success or failure of batch scrip...