ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: file size
Date Tue, 19 Nov 2002 15:00:03 GMT
<?xml version="1.0"?>

<!-- ANT build file to test a specific feature or bug of ANT.
     Dominique Devienne <>      October 2002
<project name="filesize" default="test" basedir=".">

  <target name="test">
    <!-- Sets the file.size property with the length of the
         file as named in the ant.file property -->
    <script language="javascript"><![CDATA[
      filename = self.getProject().getProperty("ant.file");
      file = new;
      self.getProject().setNewProperty("file.size", file.length());
    <echo message="current build file size is '${file.size}'" />


-----Original Message-----
From: mm [] 
Sent: Tuesday, November 19, 2002 4:38 AM
Subject: file size


is there a way how to find size in byte of specified file through some ant
task and not exec.. ?

mirek mocek

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message