从ANT启动Windows资源管理器?

时间:2010-03-04 17:14:12

标签: windows ant explorer

有没有办法在不停止构建的情况下从ant启动Windows资源管理器?

这是我到目前为止所做的:

<project default="default">
 <target name="default">
  <fail unless="customerName">
   You need to set the customerName.
   -DcustomerName=Value
  </fail>
  <fail unless="htmlCode">
   You need to set the htmlCode.
   -DcustomerName=Value
  </fail>
  <exec executable="cmd">
   <arg value="-b">

  </exec>
  <exec executable="explorer">
   <arg value='"C:\working_copies\${customerName}\${htmlCode}"' />
  </exec>
  <exec executable="explorer">

                 

不幸的是,上面的代码暂停了每个打开的窗口,我没有同时获得两个浏览器窗口。

1 个答案:

答案 0 :(得分:3)

这应该有效:

<exec executable="cmd.exe"
      dir="C:\working_copies\${customerName}\${htmlCode}">
      <arg line="/c explorer ." />
</exec>