Exit /B %ERRORLEVEL% ???

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Re: Exit /B %ERRORLEVEL% ???

#16 Post by tinfanide » 28 Mar 2012 21:44

Oh... yes, I see. It makes sense to me now. Thanks for all that a lot.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Exit /B %ERRORLEVEL% ???

#17 Post by foxidrive » 29 Mar 2012 00:16

foxidrive wrote:Here is an example.

If myfile.ini is not found then the batch file will return errorlevel 12 otherwise it will return the errorlevel of "my program.exe"




It's just an example of how something can be written (with the typo in the setlocal command). It was meant to be studied as a mental exercise and not actually run.

tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Re: Exit /B %ERRORLEVEL% ???

#18 Post by tinfanide » 29 Mar 2012 00:22

Yes, :D , that's why I was saying in previous posts that I might be figuring it out once I'd use it when I code on my own. Anyway, thanks.

Post Reply