My question is to continue this topic: Ant: copy the same set of files to several places
I am new to mappers. Can anyone (care?) Kindly share an example of using mapper for this? Here is what I am trying to do:
parent_folder
| ---- child1_folder
| | ---- files
| | ---- config.file
| | ---- data.txt
| ---- child2_folder
| ---- child3_folder
.
.
.
| ---- childn_folder
I have no way to use ant -contrib (sorry ... the location of ant or any taskdesf is not under my control). Therefore, I do not know how to overlap an indefinite number of folders.
Limitations on me:
- I only know the name of child1_folder (I don't know the names of other children)
- The number of other children is not determined.
- I expect to create a
files folder under each child folder (through another task, if not copied).
Here is what I tried (currently trying to create one file, it will expand with additional cards as soon as it starts working):
<copy todir="/tmp/parent_folder" verbose="true"> <fileset dir="/tmp/parent_folder"> <include name="*/files/config.file"/> </fileset> <mapper type="glob" from="*/files/config.file" to="*/files/config.file"/> </copy>
He continues to say skipped - don't know how to handle it , followed by No sources found. .
Thanks in advance, Parag Doke
Another (maybe?) Question: Using mapper and a set of files to copy files to another subdirectory?
source share