set var=%1
echo var
set command=""
IF var==true (
set command=dir
)
IF var==false (
set command=dir /a
)
echo %command%
%command%
So, if I run this script by typing in
C:\>test true
the echo %command% always prints "". Any idea?