ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: truncating a directory
Date Mon, 27 Sep 2004 05:23:59 GMT
Not tried, but using a mapper [1] should help:
<move todir="">
    <fileset dir=""/>
    <regexpmapper from="*/(.*)" to="\1"/>
</move>

Jan


[1] http://ant.apache.org/manual/CoreTypes/mapper.html


> -----Urspr√ľngliche Nachricht-----
> Von: Greg Irvine [mailto:greg.irvine@thalesatm.com]
> Gesendet am: Montag, 27. September 2004 03:44
> An: 'Laconia Data Systems'; 'Ant Users List'
> Betreff: RE: truncating a directory
> 
> Hi Martin.
> 
> Thanks for your response, but I think there was a slight 
> misunderstanding of
> my requirements.
> 
> I don't wish to delete files/directories beneath a given 
> directory as would
> seem to be the aim of the DeleteSub task.
> 
> I wish to move the contents of a number of directories to a single
> directory, using a wildcard based set.  E.g. move build/*/** test/
> 
> i.e.  Starting with:
> build/
> 	dirA/
> 		subDirA/
> 			fileA.java
> 	dirB/
> 		subDirB/
> 			fileB.java
> 
> 
> Ending with:
> test/
> 	subDirA/
> 		fileA.java
> 	subDirB/
> 		fileB.java
> 
> 
> 
> Thanks for your email anyway.
> 
> Regards,
> 
> Greg.
> 
> 
>         
> 
> -----Original Message-----
> From: Laconia Data Systems [mailto:webmaster@laconiadatasystems.com] 
> Sent: Monday, 27 September 2004 11:23 AM
> To: Ant Users List; greg.irvine@thalesatm.com
> Subject: Re: truncating a directory
> 
> yes Greg
> I created a java task called DeleteSub which deletes ALL files and ALL
> directories of a specified root folder specification
> now available at ftp.laconiadatasystems.com
> let me know if you're interested and I'll create a 
> username/password for you
> for access
> Kind regards,
> Martin Gainty
> ----- Original Message -----
> From: "Greg Irvine" <greg.irvine@thalesatm.com>
> To: "'Ant Users List'" <user@ant.apache.org>
> Sent: Sunday, September 26, 2004 7:57 PM
> Subject: truncating a directory
> 
> 
> > Is there an easy way to remove the first directory from a directory
> > structure when moving a file set?
> >
> >
> >
> > i.e.
> >
> >     build/
> >
> >         project1/com/mycompany/project1/**/*.class
> >
> >         project2/com/mycompany/project2/**/*.class
> >
> >         project3/com/mycompany/project3/**/*.class
> >
> >
> >
> > to (where the first directory (project1, project2 and project3) are
> > removed).
> >
> >     test/
> >
> >         com/mycompany/project1/**/*.class
> >
> >                                    project2/**/*.class
> >
> >                                    project3/**/*.class
> >
> >
> >
> >
> >
> > I could probably use the foreach task in the ant-contribs, 
> but is there an
> > easier way?
> >
> >
> >
> > Thanks for any advice.
> >
> >
> >
> > Greg.
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message