I\'m writing a simple .bat file and I\'ve run into some weird behavior. There are a couple places where I have to do a simple if/else, but the code inside the blocks don\'t
Looks like the read and write use different scoping rules.
If you eliminate this line
set MODE=FOOBAR
it will work as expected. So you'll probably need to have a complex series if if/elses to get the variables populated as you'd like.