ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Ant Delete task - Deleting a file from a directory while comparing from another directory
Date Tue, 23 Oct 2007 21:28:18 GMT
Bold? Red?

Unfortunately, like most mailing lists, this is a text only list.
You'll have to point out the line numbers that you have questions
about, and where in the line. Also remember that not everyone uses
monospaced fonts (stupid Gmail!), so you can't depend upon line
spacing to help point out the error either.

It looks like you ask it to delete files only if the file is found in
the ${release.dir}, but not in the ${backup.dir}. Is this correct?

Then, it moves all the files from ${release.dir} to ${backup.dir}.

My only issue is that if there is a new file, you're not moving it to
backup.dir.


On 10/23/07, arunks <arun.sangal@galileo.com> wrote:
>
> 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>
>
> Brgds,
> Arun Sangal
> SCM   1 - (303) 397 6059
> arun.sangal@galileo.com
>
> --
> View this message in context: http://www.nabble.com/Ant-Delete-task---Deleting-a-file-from-a-directory-while-comparing-from-another-directory-tf4679976.html#a13372424
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message