AndreaNobili
AndreaNobili

Reputation: 42957

How to delete all .jar file into a directory using Ant?

I am pretty new to ant and I would delete all the .jar files that are into a directory.

Can I do something like it to do it?

<delete file="../Release/*.jar" />

Tnx

Andrea

Upvotes: 1

Views: 1443

Answers (2)

Keerthivasan
Keerthivasan

Reputation: 12880

You can do it like this

<delete>
    <fileset dir="../Release/" includes="*.jar"/>
  </delete>

ANT Documentation is very easy to follow. Please learn using this link

Upvotes: 1

micha
micha

Reputation: 49572

According to the documentation

<delete>
  <fileset dir=".." includes="Release/*.jar"/>
</delete>

should do the job.

See the examples of the Delete Task documentation for more details.

Upvotes: 2

Related Questions