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.mack...@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:bode...@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-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org


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

Reply via email to