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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to