1

I am trying to retrieve the list of all zip files present in a directory.

I have a directory ${src} which contains some zip files and I am using the following code

<target name="test">  
<dirset id="dist.contents" dir="${src}" includes="*.zip"/>  
<property name="prop.dist.contents" refid="dist.contents"/>  
<echo message="${prop.dist.contents}" />  
</target>  

but it only echoes null.

I also tried includes="*" but it didn't make any difference.

I am using Ant version 1.7.0.

kenorb
  • 155,785
  • 88
  • 678
  • 743
user1856732
  • 119
  • 1
  • 7

1 Answers1

0

As written in the documentation:

A DirSet is a group of directories.

So since you want zip files, you should use a FileSet.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255