ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Gardner <>
Subject RE: multiple file check
Date Thu, 06 Feb 2003 18:58:18 GMT
Thanks this is working a treat;

>>Martin, I suspect your option would work as well, but its nice to keep it
purely in ANT until I *have* to get more complex :).

  <target name="look.for.conflict">        
    <fileset dir="${conflict.dir}" includes="**/*.*" id="conflict.files" >
      <present targetdir="${patch.dir}/${cvspackage}/${}"/>
    <pathconvert targetos="unix" pathsep="" property="conflict.files"
refid="conflict.files" />
    <echo  message="conflict.files:${conflict.files}" level="info"/>
    <condition property="conflict.files.exist">
	    <equals arg1="${conflict.files}" arg2=""/>

Dan Gardner        Emap IT - UK

>-----Original Message-----
>From: Dominique Devienne []
>Sent: 06 February 2003 18:06
>To: 'Ant Users List'
>Subject: RE: multiple file check
>Just define a <fileset> with a <present> selector. To check 
>whether this
>selected any files, Then <pathconvert> the fileset to a string 
>property, and
>check with <condition>/<equals> whether the string is empty or 
>not. --DD
>-----Original Message-----
>From: Dan Gardner [] 
>Sent: Thursday, February 06, 2003 11:58 AM
>To: ''
>Subject: multiple file check
>I would like to compare two directories and see if any files 
>in directory_A
>exist in directory_B.
>Is this possible ?
>One way would be to use an exec task to run an OS script:
>Something along the lines of "ls -R1 > filelist.txt" against 
>directory_A and
>then use this list for a find command against directory_B.  
>But does ANT
>have a task I'm unaware of ?
>Dan Gardner        Emap IT - UK
>To unsubscribe, e-mail:
>For additional commands, e-mail:

** For great Emap magazine subscription & gift offers visit

The information in this email is intended only for the addressee(s) named above.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient of this message any disclosure, copying, 
distribution or any action taken in reliance on it is prohibited and may be unlawful. 

Emap plc and or its subsidiaries do not warrant that any attachments are free from 
viruses or other defects and accept no liability for any losses resulting from 
infected email transmissions.

Please note that any views expressed in this email may be those of the originator 
and do not necessarily reflect those of this organisation.

View raw message