The ".BAT" file processor contains a very crude (compared to, for example, the 1985 Commodore Amiga) conditional facility. It's essentially an "if [returncode] relational-operator value goto label" syntax, with the [returncode] meaning that it's implied and never explicit. A variant is used for
string comparisions such as parameter checing. I think if you type "IF /?" it will help you - at the moment I'm nowhere near a Microsoft OS to be able to get the exact details. Typing "HELP IF" at the command prompt might bring up some detailed documentation.
I recommend Ant myself. It understands the types of things that you do in a Java environment and it's OS-independent. It's also nowhere near as formidable as it appears at first glance.
http://jakarta.apache.org/ant I worked some with WLS 6, but it's been several months back now.