<?xml version="1.0"?> <!-- ANT build file to test a specific feature or bug of ANT. Dominique Devienne <[EMAIL PROTECTED]> 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 java.io.File(filename); self.getProject().setNewProperty("file.size", file.length()); ]]></script> <echo message="current build file size is '${file.size}'" /> </target> </project> -----Original Message----- From: mm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 4:38 AM To: [EMAIL PROTECTED] Subject: file size hi, is there a way how to find size in byte of specified file through some ant task and not exec.. ? thanks mirek mocek -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>