|I am trying to write a command script with a FOR loop that sets a variable then compares it to a known value. Looking at examples, like the one below, I need to use EnableDelayedExpansion. Simple enough however I do not see it working. Here is a sample script I am running.|
if "%var%" == "before" (
if !var! == "after" @echo if you see me, it worked
This gives me the following output -
C:\>if "before" == "before" (
if !var! == "after"
What am I doing wrong here?