wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to delete a zipped folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to delete a zipped folder" Watch "How to delete a zipped folder" New topic
Author

How to delete a zipped folder

kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Hi,

Suppose there is a zipped folder name "myZip.zip".

It contains two text files let say text1.txt and text2.txt.

What i need is to delete the "myZip.zip".


How to do that?

Thanks,
Kaya.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

A zipped folder is actually a simple ZIP file, so File's delete() method should do the trick.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Thanks Rob.

Previously i tried with this. But did some mistakes thts why i did not get result.

Anyways thanks a lot. I did it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to delete a zipped folder
 
Similar Threads
how to search for a certain extension within a folder
path problem
problem in unzipping
Zip file creation with directory suppression through an API
[SOLVED] Is the war compression idempotent?