What's the best way to declare and use a boolean variable in Batch files? This is what I'm doing now:
set "condition=true"
:: Some code that may change the condition
if %condition% == true (
:: Some work
)
Is there a better, more "formal" way to do this? (e.g. In Bash you can just do if $condition
since true
and false
are commands of their own.)