ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hardacker, Andrew" <Andrew.Hardac...@Compuware.com>
Subject RE: Deleting all nested dirs/files except one?
Date Thu, 05 Jun 2003 15:04:34 GMT
oops, make that:

    <delete includeemptydirs="true">
        <fileset dir="test">
            <include name="**"/>
            <exclude name="saveme/**/*"/>
            <exclude name="savemetoo/**/*"/>
        </fileset>    
    </delete>


-----Original Message-----
From: Hardacker, Andrew [mailto:Andrew.Hardacker@Compuware.com]
Sent: Thursday, June 05, 2003 10:28 AM
To: 'Ant Users List'
Subject: RE: Deleting all nested dirs/files except one?


This works for me:

   <delete includeemptydirs="true">
        <fileset dir="test">
            <include name="**"/>
            <exclude name="saveme"/>
            <exclude name="savemetoo"/>
        </fileset>    
    </delete>

Andy Hardacker

-----Original Message-----
From: Duffey, Kevin [mailto:KDuffey@marketron.com]
Sent: Wednesday, June 04, 2003 5:47 PM
To: Ant Users List
Subject: RE: Deleting all nested dirs/files except one?


This is what I am trying to avoid. Seems to me if you can specify file name
wild cards, you should be able to do the same with dirs, such that you can
"exclude" some dirs, and delete everything else, including files. No way to
do this yet heh?

-----Original Message-----
From: Beccio, Paul [mailto:Paul.Beccio@baesystems.com] 
Sent: Wednesday, June 04, 2003 2:27 PM
To: 'Ant Users List'
Subject: RE: Deleting all nested dirs/files except one?

It looks like you might have to write out each dir you want deleted. In all
of the examples I've seen so far, it gives:

<delete dir='folderName'>



-----Original Message-----
From: Duffey, Kevin [mailto:KDuffey@marketron.com]
Sent: Wednesday, June 04, 2003 5:09 PM
To: Ant Users List
Subject: RE: Deleting all nested dirs/files except one?


I did that, still gives me that error. I thought the same thing, no reason
to have dir in both the delete task and a fileset.

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Wednesday, June 04, 2003 1:47 PM
To: Ant Users List
Subject: RE: Deleting all nested dirs/files except one?


get rid of the "dir" attribute on the <delete> task.

Jake

At 11:05 AM 6/4/2003 -0700, you wrote:
>Almost. It still deleted all files in the various directores, but at least 
>it deleted the directores this time. For some reason I keep getting this 
>error message:
>
>clean:
>    [delete] DEPRECATED - Use of the implicit FileSet is deprecated.  Use 
> a nested fileset element instead.
>    [delete] Deleted 28 directories from C:\test
>    [delete] Deleting 1 files from C:\test
>
>
>So what does it mean by saying its deprecated? I know what deprecated is, 
>I just see no reason why it is giving me this error when I am infact 
>nesting a <fileset> inside of the <delete>.
>
>
>-----Original Message-----
>From: Jacob Kjome [mailto:hoju@visi.com]
>Sent: Wednesday, June 04, 2003 10:42 AM
>To: Ant Users List
>Subject: Re: Deleting all nested dirs/files except one?
>
>
>Try this...
>
><exclude name="scripts/**/**"/>
>
>Jake
>
>At 10:04 AM 6/4/2003 -0700, you wrote:
> >Hi,
> >
> >I am trying to get my script to do a clean build. The dir structure of
our
> >project is like:
> >
> >/bin
> >/dist
> >/src
> >/lib
> >/doc
> >/scripts
> >
> >
> >I put our build scripts in the /scripts folder. So I want to delete ALL
> >folders except the /scripts folder. In fact, I want to delete the entire
> >base dir of the project, all sub folders, files, etc, except the /scripts
> >dir and the /doc dir. When this is done, I then grab the latest out of
> >CVS. How can I do this?
> >
> >I have tried:
> >
> ><delete includeEmptyDirs="true" dir="${PROJECT_HOME}" 
> defaultexcludes="false">
> >         <fileset dir="${PROJECT_HOME}">
> >                 <exclude name="scripts/**"/>
> >                 <exclude name="doc/**"/>
> >         </fileset>
> ></delete>
> >
> >This works in that it deletes ALL files. But it doesn't delete the dirs.
I
> >am hoping to avoid having to specify every single dir one at a time in
> >individual delete tasks.
> >
> >Also, what is the name of the folder where ya'll keep your build scripts?
> >I named it /scripts, seemed appropriate enough. I have seen some name it
> >/build. What is the norm for this name?
> >
> >Thanks.
> >
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
> >
> >
> >
> >***********************************************************
> >The information contained in this e-mail message may be
> >confidential and  protected from disclosure. If you are
> >not the intended recipient, any dissemination, distribution
> >or copying is strictly prohibited. If you think that you
> >have received this e-mail message in error,
> >please e-mail the sender at exchangeadmins@marketron.com
> >***********************************************************
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
>
>
>
>***********************************************************
>The information contained in this e-mail message may be
>confidential and  protected from disclosure. If you are
>not the intended recipient, any dissemination, distribution
>or copying is strictly prohibited. If you think that you
>have received this e-mail message in error,
>please e-mail the sender at exchangeadmins@marketron.com
>***********************************************************
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
 


***********************************************************
The information contained in this e-mail message may be 
confidential and  protected from disclosure. If you are 
not the intended recipient, any dissemination, distribution
or copying is strictly prohibited. If you think that you 
have received this e-mail message in error,
please e-mail the sender at exchangeadmins@marketron.com
***********************************************************

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

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003
 


***********************************************************
The information contained in this e-mail message may be 
confidential and  protected from disclosure. If you are 
not the intended recipient, any dissemination, distribution
or copying is strictly prohibited. If you think that you 
have received this e-mail message in error,
please e-mail the sender at exchangeadmins@marketron.com
***********************************************************

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



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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


Mime
View raw message