Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
AW: iterate through files

AW: iterate through files

2007-08-03       - By Jan.Materne@(protected)

* A <fileset><modified/> will filter out all files already processed.
* A <fileset> will be scanned if task is executed.
* I dont know <while> taskcontainer which could provide something like
  <while>
      <condidion><notempty><fileset id="fs"...>
      <sequential>
          <dosomething><fileset refid="fs"


Not the right solution, but maybe a step...

<antcontrib:for begin="1" end="50" param="notused">
   <antcontrib:for param="file">
       <fileset ...>
           <modified/>
       </fileset>
       <sequential>
           <echo>processing @{file} ... </echo>
       </sequential>
   </antcontrib:for>
</antcontrib:for>



Jan


>-----Urspr?ngliche Nachricht-----
>Von: Mario Madunic [mailto:hajduk@(protected)]
>Gesendet: Freitag, 3. August 2007 00:13
>An: Ant Users List
>Betreff: iterate through files
>
>(Running Ant from a bat file triggered by a directory watching app.)
>
>Is is possible to iterate through a directory of files (that
>can have files
>added while the task is running), one at a time before running
>the task again?
>In other words I want to grab a single file parse it with an
>Ant task, delete
>it, and then start all over again till the directory is empty.
>Each run through
>the task takes about 5 seconds and don't want any collision
>between files (there
>are multiple XSLT tasks ending in one of 2 BCP inserts into a
>SQL Server). Using
>a scheduled task is a last resort.
>
>Any help will be greatly appreciated.
>
>Thanks
>
>Marijan (Mario) Madunic
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@(protected)
>For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.