Sven, 
--- "Haiges, Sven, Vodafone Group R&D"
<[EMAIL PROTECTED]> wrote:

> 
> Does anyone know how I can simplay determine the
> byte-size of a file
> from ant and take that output and replace the
> occurrence of @size@ with
> the size determined?

This script does this:
<project>
    <scriptdef name="size" language="javascript">
        <attribute name="file"/>
        <attribute name="property"/>
        <![CDATA[
            importClass(java.io.File);
            f = new File(attributes.get("file"));
           
project.setNewProperty(attributes.get("property"),
f.length());
        ]]>
    </scriptdef>
    <size file="filesize.xml" property="length"/>
    <echo>$${length} is ${length}</echo>
</project>

HTH Ivan
> 
> Thanx a lot for you help.
> 
> Cheers\
> Sven
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



        
                
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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

Reply via email to