Discussions

EJB design: Help needed- How do i do a subdirectory for archive files?

  1. Help needed- How do i do a subdirectory for archive files and prompt the user to type in the filename that he/she wants to zip?Can someone show me an example on that?Besides that, how do I do a spitting after zipping files. Need it urgently,hope someone will help. Thanks a lot!
  2. I am not sure if I understood your question correctly. Correct me if i am wrong. You are asking if /** we can prompt the user to provide the file name or folder name and then zip the files in that folder and subfolders, into a .zip file that has the user-entered file name.**/ If this is so, you can prompt the user to enter the file name on clientside using javascript like prompt(...) and then pass the filename to your serverside code wherein you can use the java.util.zip package classes to zip the files under a specific folder.

    Hope this helps.

    Sudhakar
  3. Can you show me some sample codes on that? Cos I don't quite understand what you are saying.Thanks!
  4. Hi,

    Can you please send me the more detail on this so i can help you.,

    Thanks
    Ravi Rasappan.
  5. More details on that[ Go to top ]

    I have to compress some files like .bmp into a .zip folder.I have done this.But now,I have to have create
    subdirectory for that and then I have to for example,ask the user to choose which files he/she wants to zip it up. Next, I will have to do splitting. So is there any source codes for reference? Thanks!
  6. More details on that[ Go to top ]

    Does that mean you want to create a subdirectory inside the zip file, that you have already bundled.? If not so, creating a subdirectory in the filesystem is plain and straight. You can prompt the user to enter the files using prompt(..) javascript function and then send those strings to the serverside to perform zipping.
  7. Sorry,I think the previous message I have explain it wrong.Actually, I just need to zip folders.But I not sure of doing that,so can someone show me an example using codes to zip up folders? Thanks!