ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mackley" <Aaron.Mack...@dtint.com>
Subject RE: Trouble with <copy> and <DirSet>
Date Fri, 10 Sep 2010 14:40:28 GMT
Stefan,

Thank you for your response on this. You stated:

" This would match any directory that end in .default - but not the
files
contained within them."

I actually need to pick up the name of the directory, not the files, but
your information was helpful.

My specific task is that I need to copy one file to a randomly generated
directory. The installation process creates a randomly generated
directory name. I have to identify that randomly generated name and then
copy the one file to that directory.

I currently have this code: (I am trying to copy prefs.js to the random
directory *.default.)

<copy todir="${firefox.dir}">
	<dirset dir="${firefox.dir}">
		<include name="**/*.default"/>
	</dirset>
	<fileset dir="${apps.dir}/Firefox">
		<include name="prefs.js"/>
	</fileset>
</copy>



Is this the right way to go about this?


Aaron Mackley   |  QA Engineering  |  Digital Technology International
| 801-853-5000  |  aaron.mackley@dtint.com
Transform profitably with our new Targeted Audience Solutions and DTI
Cloud. Get started at www.dtint.com.
-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Thursday, September 09, 2010 10:14 PM
To: user@ant.apache.org
Subject: Re: Trouble with <copy> and <DirSet>

On 2010-09-09, Aaron Mackley wrote:

> I have a single file that needs to be copied into a random folder
> name.  I know the folder path except for the last folder, which will
> be called xxxxxxxx.default, where xxxxxxxx is a random set of
> characters.
> 
> This may be easier than I am trying to make it, but I am trying to use
> a DirSet within a Copy, like this:

> <dirset dir="${firefox.dir}">
>   <include name="**/*.default"/>
> </dirset>

This would match any directory that end in .default - but not the files
contained within them.

<fileset dir="${firefox.dir}">
   <include name="**/*.default/**"/>
</fileset>

is probably what you want.

Stefan

---------------------------------------------------------------------
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