ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: how can i use filenames in scripts?
Date Fri, 17 Jun 2005 17:42:22 GMT
You can probably accomplish what you need by looping over the fileset with the <foreach>
task, from ant-contrib (http://ant-contrib.sourceforge.net/tasks/tasks/index.html)

You might want to use the <basename> task in the loop also, to remove the path part
of the filename.

-Rob A

> -----Original Message-----
> From: Jörg Uhlmann [mailto:joerg.uhlmann@gmx.de]
> Sent: Friday, June 17, 2005 3:54 AM
> To: user@ant.apache.org
> Subject: how can i use filenames in scripts?
> 
> 
> Hello,
> 
> i have some html files. A token in this files would i replace 
> with the 
> filename.
> 
> e.g.
> 
> my_page.html
> 
> <body>
>    <!--        filename: @filename@
>    -->
> </body>
> 
> result:
> 
> <body>
>    <!--        filename: my_page.html
>    -->
> </body>
> 
> 
> the replace task, has no access to the filename. The same in 
> the fileset 
> task.
> How can i do it?
> 
> thanks
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message