ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Patternsets and Filesets
Date Thu, 12 Dec 2002 20:13:16 GMT
Use Ids:

<fileset id="myfiles"
  <include name="*.gif" />
  <include name="*.jpg" />

<delete quiet="true">
  <fileset refid="myfiles" />


-----Original Message-----
From: Nathan Christiansen [] 
Sent: Thursday, December 12, 2002 1:51 PM
To: 'Ant Users List' (E-mail)
Subject: Patternsets and Filesets

I have been looking over patternsets anf filesets and am not quite sure how
to do what I want to do.

What I want to do is:
1. Get a listing of all files in directory A. 
2. Save the list into a property or equivalent. 
3. Use the list to select which files to delete from directory B.

Step 1 is easy:

<fileset dir="${web.src.dir}/images">
  <include name="*.gif" />
  <include name="*.jpg" />

For Step 2 I don't know how to save this result into a variable.

And for step 3 I would like to:

  <fileset dir="${web.deploy.dir}/images">
    <[Saved File Listing from Step 2]>

So if I have 3 files in ${web.src.dir} I would like to delete the same three
files from ${web.deploy.dir} without touching the other files in

Is it possible to use patternsets for this or are patternsets used for
saving the include and exclude patterns only and not for saving the results
of the task.

If not patternsets then how?

-- Nathan Christiansen

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

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

View raw message