Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a code in command prompt windows like below. I run it by "file.bat"
<br />
if not %Ret1%==0 exit /B %Ret1%<br />


I want to get return value of variable "Ret1". But i can't. How can i get it?
Posted
Updated 14-Oct-10 16:41pm
v2
Comments
thuyphuongid 14-Oct-10 22:41pm    
Anyone help me.

1 solution

You can check with ERRORLEVEL.

IF ERRORLEVEL 1 GOTO LABEL1


http://www.robvanderwoude.com/errorlevel.php[^]

http://www.computerhope.com/if.htm[^]

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900