ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Irvine" <greg.irv...@thalesatm.com>
Subject RE: truncating a directory
Date Mon, 27 Sep 2004 01:43:33 GMT
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
View raw message