Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Zip & delete on the basis of timestamp

 
Max White
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to zip and then delete the selected files from the src folder.I am using following 2 targets.

<target name="delete" depends="zip">
<delete verbose="true">
<fileset dir="${src}" includes="*.class">
<and>
<depth max="1"/>
<date datetime="${start.time}" when="before"/>
</and>
</fileset>
</delete>
</target>

<target name="zip">
<zip destfile="${dest}.zip" duplicate="preserve">
<zipfileset dir="${src}" prefix="${prefix}">
<and>
<depth max="1"/>
<date datetime="${start.time}" when="before"/>
</and>
</zipfileset>
</zip>
</target>

Delete is working fine but zip target is not.The zipped folder doesnt contain the file which is in the sub-directory of the {src}.
What's wrong in my zip target?
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic