You can do this with Ant as follows:

<delete includeEmptyDirs="true">
  <fileset dir="dir_name" includes="**/*" defaultexcludes="no"/>
</delete>