batch-file If statements If variable exists / set


Example

If Defined Foo (
    Echo Foo is defined
)

This would check if a variable is defined or not. Again, the Not operator can be used.