ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Surtani, Manik" <>
Subject Javascript to write MKDIR task ...
Date Tue, 25 Sep 2001 15:00:05 GMT
Hello again,

I have been looking at using javascript with the <script ...> tag to loop
thru tasks, but can't seem to pass values to certain tasks:

E.g., I need to make a series of directories, and I do the following:

   <script language="javascript"> <![CDATA[

      for (i=1; i<=10; i++) {
        md = myProject.createTask("mkdir");
        md.setDir("/path/to/dir/dir_" + i);

    ]]> </script>

.. And I get an error about setDir() not taking a String as a parameter.
The ANT API says setDir() takes a File class, but how can I create a File
class out of '"/path/to/dir/dir_" + I' in javascript?

Any help is appreciated.

Thanks in advance.

Manik Surtani

'Innovative Change in Business'
T 44 (0) 1784 221829
F 44 (0) 1784 470451
The information contained in this message is confidential and is intended
for the addressee only. If you have received this message in error, please
notify us as soon as possible. The unauthorised use, disclosure, copying or
alteration of this message is forbidden.

View raw message