ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: copying files
Date Fri, 14 Apr 2006 14:30:08 GMT
Stan Ou wrote:

Hello Stan,

this is a use of the copy task using a nested regexp mapper.

Please refer to the documentation.

You would roughy do :

<copy todir="c:\to">
     <fileset dir="c:\from">
     </fileset>

   <regexpmapper from="^([^/]+)/([^/]+)/(.*)$$" to="\2/\3"/>


</copy>

Please test this suggestion, the regexp might need tweaking.

Regards,
Antoine

>Hi all,
>
>I've a situation here hope someone could give me some
>guidance.
>
>In my build script, I need to copy some files like
>this:
>
>from:
>c:\from\qaz\123\common\some.xml
>c:\from\wsx\345\common\some.xml
>c:\from\edc\678\common\some.xml
>
>to:
>c:\to\123\common\some.xml
>c:\to\456\common\some.xml
>c:\to\678\common\some.xml
>
>now that problem is the list is about 80 files long
>and could grow even more.  I know I could do this:
>
><copy todir="${to.home}" overwrite="true">
>      <fileset dir="${from.home}/qaz/123"
>includes="**/common/"/>
>
><copy todir="${to.home}" overwrite="true">
>      <fileset dir="${from.home}/wsx/345"
>includes="**/common/"/>
>
>But I was wondering if there's a smarter way to do it.
> Am I stuck with writing my task? thanks.
>
>stan ou
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------------------------------------------------
>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