Guys, I could do it, its mentioned in the ant tutorial.

Regards,
Akhil

-----Original Message-----
From: Akhil Kumar
To: '[EMAIL PROTECTED]'
Sent: 17/08/04 12:03
Subject: exec task

Hi folks,
  I wanted to run a DOS command from the ant scripts. for example "dir".

  How is this possible. I find out that "EXEC" task can be used to
execute
external commands and executables but when I tried using it gives me
some
exception as below:


java.io.IOException CreateProcess: dir error 2


following is the task script:

<exec dir="${src}" executable="dir"  output="dir.txt">
</exec>


any idea what could be the problem or any other way to achieve it?

Thanks in advance,
Regards,
Akhil

Reply via email to