ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Copy from A -> B based on file structure of C?
Date Tue, 02 Nov 2010 03:08:41 GMT
I haven't had a chance to play around with this, but you might want to
look at the file mappers:
<http://ant.apache.org/manual/Types/mapper.html> to get what you want
done.

Another possibility is the antcontrib task of <foreach>. This can take
a list of files from a fileset, and apply something to each one of
them. You might be able to specify each one you want to copy this way.

On Mon, Nov 1, 2010 at 8:03 PM, kerryland <kerry@fidelma.com> wrote:
>
>
> I'd like to copy files from one directory to another, but only those files
> that exist in
> a given directory.
>
> eg, given 3 directories:
>
>   /everything/a.txt
>              /b.txt
>              /c.txt
>
>   /not-much/b.txt
>
>   /destination
>
> ... I'd like to copy files from "everything" to "destination", but only
> the files that EXIST in "not-much".
>
> ie: copy /everything/b.txt to /destination
>
> Of course I don't know what files I might want to copy. It depends on
> whatever is in "not-much".
>
> Here's my imaginery, wrong, syntax:
>
>    <copy todir="destination" >
>       <fileset dir="everything">
>           <filelist dir="not-much"/>
>       </fileset>
>    </copy>
>
> Thoughts?
>
> Thanks
> Kerry
> --
> View this message in context: http://ant.1045680.n5.nabble.com/Copy-from-A-B-based-on-file-structure-of-C-tp3245973p3245973.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

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


Mime
View raw message