title: Batch File to change directory and run a command
body: <p>I want to execute two cmd commands.This is my batch file:</p>
  
  <pre><code>set MW_HOME=D:\wls1211_dev
  set JAVA_HOME=D:\jdk1.6.0_45
  set JAVA_VENDOR=Oracle
  set root=D:\wls1211_dev
  set pathname=D:\WLSDomain
  CD /D %root%
  %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd
  CD /D %pathname%
  startWebLogic.cmd
  </code></pre>
  
  <p>But after executing the setWLSEnv.cmd command its not moving to the next directory where it has to execute the startWebLogic.cmd .</p>
  
  <p>Thanks for your help.</p>