try the ANT contrib task propertyregexp
http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html
One example would be to use it this way
<propertyregex property="dest.file"
input="${current.file}"
regexp="(.*)\.TEMPLATE"
select="\1"
casesensitive="false" />
<copy file="${current.file}" flatten="true"
tofile="${dir.dist}/${current.env}/${dest.file}">
<filterchain>
<expandproperties/>
</filterchain>
</copy>
regards
Sunil Prabhakaran
On 10/19/07, Eric Wood <[EMAIL PROTECTED]> wrote:
>
> I have a bunch of templates that I expandproperties on to produce
> environment specific versions using the following code:
>
> <copy file="${current.file}" flatten="true"
> todir="${dir.dist}/${current.env}">
> <filterchain>
> <expandproperties/>
> </filterchain>
> </copy>
>
> The file name ( in the property ${current.file} ) contains the name
> "TEMPLATE" and I want to remove once I perform this move. For example:
>
> log4j.properties.TEMPLATE
>
> that I want to strip the ".TEMPLATE" part when I copy this file. What is
> the best way to accomplish this task?
>
> Eric
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]