tags:

views:

52

answers:

1

Was trying to do something like this:

<copy>  
        <fileset id="mySet">
  <include name="*.sql" />
 </fileset>
</copy>
<echo message="Copied files: ${mySet} to directory: ${Folder}." />

But i get the following error:

'id' is an invalid attribute for a tag. Datatypes can only be declared at Project or Target level. Thanks

A: 

You can do this by looping over the files in the set.

<fileset id="mySet">
  <include name="*.sql" />
</fileset>
<copy>  
  <fileset refid="mySet" />
</copy>
<foreach item="File" property="filename">
  <in>
    <items refid="mySet" />
  </in>
  <do>
    <echo message="Copied files: ${filename} to directory: ${Folder}." />
  </do>
</foreach>

But depending on verbosity level the result of the copy action is echoed anyway.

The Chairman