You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dan Gardner <Da...@emap.com> on 2003/02/06 18:58:11 UTC

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



** For great Emap magazine subscription & gift offers visit http://www.emapmagazines.co.uk **

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------


Re: multiple file check

Posted by Martin <mg...@hotmail.com>.
How about 2 FileList(s) setting up an id for each
then doing a diff between them using the refids of the FileLists?
???
-Martin
----- Original Message -----
From: "Dan Gardner" <Da...@emap.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, February 06, 2003 1:58 PM
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
>
>
>
> ** For great Emap magazine subscription & gift offers visit
http://www.emapmagazines.co.uk **
>
> --------------------------------------------------------------------------
------
> 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.
> --------------------------------------------------------------------------
------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-user-help@jakarta.apache.org
>