21

Often in ANT tasks, you will see "**" used similar to below:

<copy todir="/something">
  <fileset dir="/source">
    <exclude name="**/*.sql"/>
  </fileset>
</copy>

What is the ** in the name property? I've never seen the style of wildcard. Why is *.sql not good enough?

Jordan Dea-Mattson
  • 5,791
  • 5
  • 38
  • 53
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370

2 Answers2

24

*.sql means "in the given directory, all the files that end with .sql"

**\*.sql means "in the given directory and inside all of its subdirectories, all the files that end with .sql"

SJuan76
  • 24,532
  • 6
  • 47
  • 87
0

You say .sql, it only includes sql files but not the sub-directories. If you want to include sql files and also the sql files inside sub-folders, u can use **/*.sql.

user1969650
  • 35
  • 1
  • 2
  • 5