views:

34

answers:

1

Is there any way of launching Windows Explorer from ant without stopping the build?

Here is what I have so far:

<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">

Unfortunately the code above pauses for each window opened and I don't get both my explorer windows at once.

+2  A: 

This should work:

<exec executable="cmd.exe"
      dir="C:\working_copies\${customerName}\${htmlCode}">
      <arg line="/c explorer ." />
</exec>
omermuhammed
@omermuhammed So what does the /c do? I've seen that alot on the ANT stuff.
leeand00
/c flag closes the cmd shell after it executes the the command. So in this case the cmd shell launches explorer window in the directory you want and then closes.
omermuhammed