unzipping files - works, but need hlp to make it better

Hi there! I am trying to unzip files using java.util.zip My code works If I have a parent directory for all files/folders. So when I unzip the structure is as - zipFileName -> parent folder -> child files/folders where, zipFileName and parent folder names are same. But I want to have it as parent folder -> child files/folders. Here is my code : [code] public void unzipFiles(String zipFileName, String zipFolderPath, String unzipPath) { Enumeration entries;ZipFile zipFile; try { //Set up a directory name for the unzipped files String courseFolderName = zipFileName.substring(0, zipFileName.indexOf(".")); //Get the zip file from its location in the "zip" folder on theServer String separator = File.separator; zipFile = new ZipFile(zipFolderPath + separator + zipFileName);

//Set up the directories in the data store entries = zipFile.entries();

The above code works if the zip file is having all files under a parent folder: zipFileName -> parent folder -> child files/folders sample output: unzipping the files... entry :C:\DataStore\template\test2/IMAGES/ Creating directory C:\DataStore\template\test2/IMAGES/ entry :C:\DataStore\template\test2/INPUTS/ Creating directory C:\DataStore\template\test2/INPUTS/ otheriwse, if I have no levels under my zip level, I get an error like this: unzipping the files... Extracting file: schedule.htm Extracting file: IMAGES/AMTC.GIFjava.io.FileNotFoundException: C:\DataStore\schedule\IMAGES/AMTC.GIF (The system cannot find the path specified) Can somebody pls help me find out where I am going wrong. Any help would be really really great. Thanks -Chandra [ February 12, 2003: Message edited by: Madhu Chandra ]