> This is how my file should look like at anytime or rather build+1
> 
> ---------- content of target file [version.txt] --------------
> [Version]
> Version=5.0
> Build=555
> Date=Wed 04/13/05 05:08:30 PM
> -------------------------------------------------------

Your problem is that this is not a .properties file, which have
a very specific format and semantic. If you maintained 2 files,
one a real property file with the same info, and another in your
desired format, you should be able to do what you want.

- CVS update both files, version.properties and version.txt
- Manipulate version.properties with <propertyfile>.
- Load the properties (with <property file="">) from the
  updated version.properties
- Simply <echo> your update version.txt file

  <echo file="version.txt">
[Version]
Version=${Version}
Build=${Build}
Date=${Date}
</echo>

You may have to prefix properties when re-loading them,
since Ant properties are immutable.

There are other ways to do this with regular expressions
and the tasks that use them, but I think the dual file
approach above is the simplest, and closest to what you tried.

--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to