I do something similar below. Using Ant Contrib optional library. This can be modified
so that the srcFile has the directory contents in it etc.
<loadfile srcFile="update.txt" property="sql.update.scripts">
<filterchain>
<tokenfilter>
<replacestring from="${pvcs.project.profile}"
to="${profileHome}" />
<replacestring from="${previous.label}:="
to="" />
<trim />
</tokenfilter>
</filterchain>
</loadfile>
<!-- loop through scripts, executing each -->
<ac:if>
<isset property="sql.update.scripts" />
<ac:then>
<ac:for delimiter="${line.separator}"
param="sql.script" list="${sql.update.scripts}">
<sequential>
<echo message="Running @{sql.script}
..." />
<antcall target="RunSQLScript">
<param name="sql.script"
value="@{sql.script}" />
</antcall>
</sequential>
</ac:for>
</ac:then>
</ac:if>
--
Richard Grey
--
--- "Mark Lybarger" <[EMAIL PROTECTED]> wrote:
does anyone know where some examples of using the ant script task can be found? i'm
looking to use a simple script which iterates over each file in a directory and calls
another ant task passing in the filename.
thanks!
~mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]