set "condition="
and
set "condition=y"
where y can be any string or number.
This allows if defined and if not defined , both of which can be used in a block statement (a sequence of statements enclosed in parentheses) to query the state of the runtime of a flag without the need for enabledelayedexpansion
t
set "condition=" if defined condition (echo true) else (echo false) set "condition=y" if defined condition (echo true) else (echo false)
The first will echo false , the second true
source share