title: using ant script to exceute a batch file
body: <p>this is a batch file that i have. It is located in <code>C:\Work\6.70_Extensions\Lab Tools\</code> folder.</p>
  
  <p><strong>ANT.BAT:</strong></p>
  
  <pre><code>set CLASSPATH=%CLASSPATH%;.;c:\JavaMail\javamail-1.3\mail.jar;c:\JavaMail\javamail-1.3\mailapi.jar;c:\JavaMail\javamail-1.3\pop3.jar;c:\JavaMail\javamail-1.3\smtp.jar;c:\JavaMail\jaf-1.0.2\activation.jar
  CALL "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
  @echo on
  
  %ANT_HOME%\bin\ant -logger org.apache.tools.ant.listener.MailLogger -q -buildfile "Master Build.xml"
  pause
  </code></pre>
  
  <p>along with <code>ant.bat</code>, i have a <code>Master Build.xml</code> file located inside the same folder.</p>
  
  <p>When i double click on <code>ant.bat</code>, it will execute the Master Build.xml ant script properly.</p>
  
  <p>However, whenever i try to use another application to open the batch file's absolute path, it always state that <code>Master Build.xml file does not exist!</code></p>
  
  <p>I tried to open the absolute path using both console application and another ANT Script(via Cruisecontrol framework) but both gives the same error. What is the error here?</p>
  
  <p>for your information here is what ive done with <code>cruisecontrol</code>:</p>
  
  <ol>
  <li>create <code>config.xml</code> (to set intervals for builds)</li>
  <li>create <code>nightbuild.xml</code> (so that <code>config.xml</code> will go into it to perform required tasks)</li>
  <li><code>nightbuild.xml</code> will run several console applications to sort files, checkout files from version control etc</li>
  <li>lastly, <code>nightbuild.xml</code> will execute <code>ant.bat</code> file to execute the build</li>
  </ol>
  
  <p>These files, <code>config.xml</code> and <code>nightbuild.xml</code> are found in <code>C:\build</code></p>