i
don't see a native way in nant, but for grins, i just did this. it's
"ugly", possibly there's a better approach, and it's not stress tested, but it
"works on my machine". basically, roll your own directory
recursion:
<target name="testCopy" >
<property name="flatcopy.dir.dest" value="bin" /> <property name="flatcopy.dir.src" value="." /> <property name="flatcopy.spec" value="*.dll" /> <call target="flatcopy" force="true" /> </target> <target name="flatcopy" >
<mkdir dir="${flatcopy.dir.dest}" /> <property name="flatcopy.dir.src.cur" value="${flatcopy.dir.src}" /> <call target="flatcopy.recurse" /> </target> <target name="flatcopy.recurse" >
<echo message="${flatcopy.dir.src.cur}" /> <copy todir="${flatcopy.dir.dest}" > <fileset basedir="${flatcopy.dir.src.cur}" > <includes name="${flatcopy.spec}" /> </fileset> </copy> <foreach item="Folder" property="dir" in="${flatcopy.dir.src.cur}" > <property name="flatcopy.dir.src.cur" value="${dir}" /> <call target="flatcopy.recurse" force="true" /> </foreach> </target>
|
Title: Message
- [Nant-users] Copy with the flatten feature Raghu Murthy
- Jean Rajotte