Folks,
I am extracting the .zip files in java using zip4j API and able to extract the files
I have used to zip the complete Directory to make zip and it contains the files and nested directory, using
zipFile.addFolder(fileDirectory, parameters);//ZIP directory files/folders
Extracting the zip using
ZipFile zipFile = new ZipFile(stringArchievedFile); //Extracts all files to the path specified zipFile.extractAll(stringExtractingFilePath);
The problem is after the extraction, files should be extracted to the path I provided with the zipFile.extractAll(path)
method but one more directory is being created. How can I extract the files to the actual specified directory
Like: Extracting Path C:\ExtractionPath
Files Path C:\SelectingPath\File1
C:\SelectingPath\File2
C:\SelectingPath\Directory1\File1
C:\SelectingPath\Directory2\File1
I will select the C:\SelectingPath directory to zip and
I will select the C:\ExtractionPath directory to extract the files
after the extractions all the extracted files will be go into the
**C:\ExtractionPath\SelectingPath**
I need all the files in the directory in
**C:\ExtractionPath** itself.
Please help me to resolve this issues.
Thanks in advance