ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject using Available for presence of ANY files
Date Mon, 10 Sep 2001 17:28:22 GMT
I am looking to use <available/> to determine the presence/absence of ANY
files (i.e., one or more files) in a directory, as a condition of whether
to run a subsequent FTP target that would tranfer the files to a remote
server.  I tried using wildcards in the 'file' attribute:

<target name="myPropertiesPresent">
     <available property="myProperties.present" file="c:\properties\*.*">


<target name="ftpToServer" depends="myPropertiesPresent" if

But the log says:

[available] Unable to find file c:\properties\*.* to set property

Does anyone know a way of using <available/> to accomplish this? If not,
what other Ant task might accomplish the equivalent?

Ronald Signorino
Technical Analyst - Chubb Corporation

View raw message