ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arunks <>
Subject Ant Delete task - Deleting a file from a directory while comparing from another directory
Date Tue, 23 Oct 2007 20:01:54 GMT

Hi All,

Can someone please let me know, whether the ANT code below is good or- what
it will do.

I have 3 files in backup.dir folder and 3+1 extra file in release.dir
folder. The 1 extra file inside release.dir folder is a new file added to
the release folder (patching) before running the code below. 

Now (for unpatching that new file), I want to write a code that should
compare the files between backup.dir and release.dir folders…and it should
pick the new file and say that oh!!! This is the new file and for
un-patching it I have to remove that new file from the release.dir folder
and then I’ll move the file’s from backup.dir folder to release.dir again
(so that the old changes will get placed on runtime release.dir folder
again, see code in Italic font, I know that it’s perfect. But I want your
suggestions for removing a file from release.dir if that file/s has/have
been added to release.dir folder recently and considered as new file/s. So
for this, see lines in BOLD font below and let me know what it will do,
whether it is a correct code, or how can I achieve my goal). 

     65     <delete>
     66       <fileset dir="${release.dir}">
     67       <present present="srconly" targetdir="${backup.dir}"/>
     68       <include name="**/*"/>
     69     </delete>

     71     <move todir="${release.dir}">
     72       <fileset dir="${backup.dir}">
     73         <include name="**/*"/>
     74       </fileset>
     75     </move>

Arun Sangal
SCM   1 - (303) 397 6059

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message