@gooshie:> if %x { is the same as if (%x != $null) {
wrong that can work in this code but it's never same try this
set %var 0
//if (%var) echo -a true | else echo -a not //if (%var != $null) echo -a true | else echo -a not
0 is not empty