I'm struggling to figure out this task in Ant. There are not many examples in the documentation and I can;t seem to find a solid answer online.
I need to scan a directory that contains several sub-directories eg
- Root
TargetFolder
- Folder A
- Folder B
- Folder C
...
- Folder Z
I need to run the build.xml from Root, and with a task scan all sub-directories of TargetFolder (so Folder A, B, C etc) and if the directory contains a file, foo.txt, run an <apply> task for that directory.
I'm able to do a <dirset> and get the list of sub-directories. And I can do a separate <fileset> to scan TargetFolder and get all occurences of foo.txt. But, I have no clue how to combine these things, or how to go about doing a simple file check attached to the <apply> task.