How can I return a value in a Windows batch file? I can do it in Unix using exit 1
but how can I do it in Windows?
-
Do you mean Windows BATCH file? Or do you actually have GNU Bash installed on Windows?– ZoredacheOct 3, 2010 at 8:34
-
Windows BATCH file– Mohammad AL-RawabdehOct 3, 2010 at 8:46
Add a comment
|
2 Answers
In a windows batch file to return a value back to the command shell use
exit /b yourexitcode
e.g
exit /b 3
will retun 3 in %ERRORLEVEL%