ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Ashoff" <Oliver.Ash...@xtramind.com>
Subject AW: deleting problems
Date Mon, 01 Dec 2003 11:44:34 GMT

Hello Myriam!

1. See 
http://ant.apache.org/manual/index.html
Core Tasks -> Delete 
There is the following example listed:

  <delete includeEmptyDirs="true">
    <fileset dir="build"/>
  </delete>

deletes all files and subdirectories of build, including build itself.

2. Assume c:/TestIt/TestDir conatains any sub-dirs "prod" and upcast
 and any other files and directories.
Then, the following will do it:

<?xml version="1.0" encoding="UTF-8"?>

<project basedir="." default="help" name="test build script">

<target name="build"  depends=""  description=""> 
 <delete includeEmptyDirs="true">
   <fileset  dir="c:/TestIt/TestDir">
    <include name="**/prod/**"/>
    <include name="**/upcast/**"/>
   </fileset>
  </delete>
</target>

</project>

Cheers, Oliver

> -----Urspr√ľngliche Nachricht-----
> Von: Myriam Delperier [mailto:myriam.delperier@ajlsm.com] 
> Gesendet: Montag, 1. Dezember 2003 10:50
> An: user@ant.apache.org
> Betreff: deleting problems
> 
> 
> hello I've got problems to delete some dirs with ant.
> I've got a root directory : 
> ${dossier.installation.up}/production
> 
> in which i want to delete all the 'prod' and 'upcat' subdirectories
> 
> I tried this : 
> 
> <delete>
> 
> <fileset dir="${dossier.installation.up}/production">
> 
> <include name="**/prod/**"/>
> 
> <include name="**/upcast/**"/>
> 
> </fileset>
> 
> </delete>
> 
> but it only deletes the contents of those...
> 
> and i tried this : 
> 
>  
> 
> <delete>
> 
> <fileset dir="${dossier.installation.up}/production">
> 
> <include name="**/prod"/>
> 
> <include name="**/upcast"/>
> 
> </fileset>
> 
> </delete>
> 
> but it doesn't work
> 
> 
> 
> does  anybody have an idea of how i can do this?
> 
> thanks for your help
> 
> 
> 
>  
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message