Proper Syntax for Nested IF and FOR Statements
Posted on 2009-03-29
I have a batch file with some nested FOR statements. In a Microsoft reference on XP command line code it says you need to preface nested statements with an "@", but I have yet to see any discussions on the Web with code using anything other than parentheses to indicate nesting.
What's the story? Is the "@" needed, and if so, does it need to be in the first column? What happens under the XP Pro SP2 command line if it is there versus if it is left out?
And if I have nested IF statements, do I really need it (like that Microsoft reference says)?
My own observations are inconclusive and I was hoping someone out there knows this obscure thing.