Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant task to delete directory contents

 
Dan Howard
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I normally use an ant task to delete a directory like this:

<delete dir="${some.dir}"/>

But what I really need is a task to delete all the files and folders in a directory but not the directory itself.

Is there such an animal?

TIA
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Ant's docs



deletes all files and subdirectories of build, without build itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic