| Author |
Creating zip containg both files and folders
|
Mrunal Pawar
Greenhorn
Joined: Feb 03, 2010
Posts: 1
|
|
Hello,
I have to create zip file. zip file may contain only files(without any folder structure)/folders/both.....& that I will select at run time
i.e. step for creating
1. first I will select files/Folder/both by using JFileChooser
2. then I will give zip file name which i want to create
3. when i clicked on create zip button then it should create a zip file containg all file and folders
currently I have added all the file paths and folder paths which i want to zipped in a list, but it is not get zipped properly, folder structure is not created properly
Please give me the code for creating zip file containing both files and folders.
Please reply soon...
thanks...
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8435
|
|
Mrunal,
Welcome to the Ranch.
Please give me the code for creating zip file containing both files and folders.
Unfortunately, we do not hand out ready made code here at the Ranch. Show us what you have got so far, tell us where you are stuck, and we will help you point in the right direction.
Do take a look at http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
Have you looked at this article which shows how to zip/unzip files?
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
SearchFirst. This question comes up every now and then, and has been answered before.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Creating zip containg both files and folders
|
|
|