Hi
I am trying to create an ant script to selectively bundle folders if the
folders contains a particular file.
E.g.

folers are:
folder_1
folder_2
folder_3

all under folder.root

The ant script should check if the folders contains a particular file (
execute.sql) and then only create a tar containing those folders.

In the example if
folder_1 and folder_2 contains the file execute.sql then the resulting tar
should contain only this two folders and ignore the folder (folder_3) which
is not having the file.

I tried with this:

<fileset dir="${folder.root}">
                                                <include
name="folder_**/execute.sql"/>
                                                <and>
                                                        <present
targetdir="${folder.root}"/>
                                                        <type
type="file"/>
                                                </and>
</fileset>

This works if any file is present in the above mentioned folders.
I wanted to extend it if it contains only execute.sql

It willbe very helpful if you can provide me some pointers.

Many Thanks
Utpal

Reply via email to