Brass, > For this specific task, we use a combination of a custom regex > function, and the loadfile, property and echo tasks.
Thanks... yours is very close to what I did. I didn't bother with the regex's and stuff. Here is what I ended up with. It works well. <target name="setversion"> <echo message="Modifying ${filetoversion}" /> <delete file="${filetoversion}.tmp" failonerror="false" /> <foreach item="Line" property="vbpline" in="${filetoversion}"> <do> <property name="vbpline" value="MajorVer=${version.major}" if="${string::starts-with(vbpline,'MajorVer')}" /> <property name="vbpline" value="MinorVer=${version.minor}" if="${string::starts-with(vbpline,'MinorVer') }" /> <property name="vbpline" value="RevisionVer=${version.revision}" if="${string::starts-with(vbpline,'RevisionVer') }" /> <echo append="true" message="${vbpline}" file="${filetoversion}.tmp" /> </do> </foreach> <move file="${filetoversion}.tmp" tofile="${filetoversion}" overwrite="true" /> </target> BOb ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users