Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Zip & delete on the basis of timestamp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Zip & delete on the basis of timestamp" Watch "Zip & delete on the basis of timestamp" New topic
Author

Zip & delete on the basis of timestamp

Max White
Ranch Hand

Joined: Jun 28, 2008
Posts: 85
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Zip & delete on the basis of timestamp