Problem in Unzipping the zip file

Hi
I have created a program to unzip the zip files in the folder named after the zip file
it is working well well when u try to zip zip files put in a directory
i.e u create a folder name contents and put files into that and then zip it
but when u directly create a zip file , without putting in a folder
it creates the folder and zip the files outside the folder
Another problem is that with the path
for e.g. suppose the zip file name is contents and path should show
contents/filename.txt but there are some other files whose path shows
res/file.txt. In this case it creates a folder of res and put it outside the
folder with the name of zip file
I have pasted my code :
//Unzip the zip files to the folder with their name
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
// Getting the path to find the type of files
public class zipper implements FilenameFilter{
          String ext;
          public zipper(String ext)
               this.ext="." + ext;
          public boolean accept(File dir,String name)
               return name.endsWith(ext);
public static void main(String args[]) throws IOException
          try
                    String dir = "D:/";
                    File f2 = new File(dir);
                    FilenameFilter fn= new zipper("zip");
                    String ss[]=f2.list(fn);
               for ( int j = 0; j < ss.length; j++)
                    System.out.println(" Extracting ...." + ss[j]) ;
                    String zipFile = dir + ss[j];
                    ZipFile zf = new ZipFile(zipFile);
                    Enumeration entries = zf.entries();
                    String directoryName = zf.getName();
                    directoryName = directoryName.substring(0, (directoryName.indexOf(":" + File.separator) + 2));
                         String folderName = zf.getName();
                         folderName = folderName.substring(0, folderName.lastIndexOf("."));
                         File file1 = new File(folderName);
                         //File file1 = new File(entries.getName());
                         file1.mkdir();
               while (entries.hasMoreElements())
                         ZipEntry ze = (ZipEntry) entries.nextElement();
                         String path = directoryName + ze.getName() ;
                         String path1 = folderName + ze.getName();
                         //System.out.println(" : " + path);
                         if (ze.getName().endsWith("/"))
                                   File file = new File(path);
                                   file.mkdir();
                                   continue;
                                   //break;
                    BufferedReader bReader = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
     StringBuffer fileBuffer = new StringBuffer(" ");
     String line ;
                    while ((line = bReader.readLine()) != null)
                              fileBuffer.append(line);
                              fileBuffer.append("\r\n");
                              //line = line + "\r\n";
                              //byte[] b = new byte[line.length()];
                              //b =line.getBytes();
                              //out.write();
                    String fileData = fileBuffer.toString();
     File f1 = new File(path);
                    f1.createNewFile();
                    //FileOutputStream out = new FileOutputStream(folderName + "/" + ze.getName());
                    FileOutputStream out = new FileOutputStream(path);
                    long size = ze.getSize();
                    byte[] data1 = new byte[fileData.length()];
                    for (int i = 0; i < fileData.length(); i++)
                              data1[i] = (byte) fileData.charAt(i);
     out.write(data1);
     out.close();
                    bReader.close();                         
               } catch (Exception e)
                         e.printStackTrace();
Thanks in Advance
Avinash

String path = directoryName + ze.getName();
String path1 = folderName + File.separator+ ze.getName();
File f1 = new File(path); // pass path1 instead of path
f1.createNewFile();
FileOutputStream out = new FileOutputStream(path); // pass path1 instead of path

Similar Messages

  • Problem in unzipping the zip files

    Hi,
    I have created a program to unzip the zip files. But when i try to zip it is creating the zipped files outside the folder where it is to be zipped.
    what is wrong with my code.
    if the zip file is migration.zip
    if the path inside the zip file shows
    and the path inside says this
    /codebase/scripts/
    it would create migration folder and create codebase folder outside the migration folder
    what is wrong with my code
    //Unzip the zip files to the folder with their name
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FilenameFilter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Enumeration;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    // Getting the path to find the type of files
    public class zipper implements FilenameFilter{
              String ext;
              public zipper(String ext)
                   this.ext="." + ext;
              public boolean accept(File dir,String name)
                   return name.endsWith(ext);
    public static void main(String args[]) throws IOException
              try
                        String dir = "D:/a/";
                        File f2 = new File(dir);
                        FilenameFilter fn= new zipper("zip");
                        String ss[]=f2.list(fn);
                   for ( int j = 0; j < ss.length; j++)
                        System.out.println(" Extracting ...." + ss[j]) ;
                        String zipFile = dir + ss[j];
                        ZipFile zf = new ZipFile(zipFile);
                        Enumeration entries = zf.entries();
                        String directoryName = zf.getName();
                        directoryName = directoryName.substring(0, (directoryName.indexOf(":" + File.separator) + 2));
                             String folderName = zf.getName();
                             folderName = folderName.substring(0, folderName.lastIndexOf("."));
                             File file1 = new File(folderName);
                             //File file1 = new File(entries.getName());
                             file1.mkdir();
                   while (entries.hasMoreElements())
                             ZipEntry ze = (ZipEntry) entries.nextElement();
                             String path = directoryName + ze.getName() ;
                             String path1 = folderName + ze.getName();
                             //System.out.println(" : " + path);
                             if (ze.getName().endsWith("/"))
                                       File file = new File(path);
                                       file.mkdir();
                                       continue;
                                       //break;
                        BufferedReader bReader = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
         StringBuffer fileBuffer = new StringBuffer(" ");
         String line ;
                        while ((line = bReader.readLine()) != null)
                                  fileBuffer.append(line);
                                  fileBuffer.append("\r\n");
                                  //line = line + "\r\n";
                                  //byte[] b = new byte[line.length()];
                                  //b =line.getBytes();
                                  //out.write();
                        String fileData = fileBuffer.toString();
         File f1 = new File(path);
                        f1.createNewFile();
                        //FileOutputStream out = new FileOutputStream(folderName + "/" + ze.getName());
                        FileOutputStream out = new FileOutputStream(path);
                        long size = ze.getSize();
                        byte[] data1 = new byte[fileData.length()];
                        for (int i = 0; i < fileData.length(); i++)
                                  data1[i] = (byte) fileData.charAt(i);
         out.write(data1);
         out.close();
                        bReader.close();                         
                   } catch (Exception e)
                             e.printStackTrace();
    Thanks in Advance
    Avinash

    String path = directoryName + ze.getName();
    String path1 = folderName + File.separator+ ze.getName();
    File f1 = new File(path); // pass path1 instead of path
    f1.createNewFile();
    FileOutputStream out = new FileOutputStream(path); // pass path1 instead of path

  • Unzip the Zip file in ABAP

    Hi
    I want to get the zip file having multiple .dat / .csv files from another server to application server.I want to unzip it and store the individual file to the folder.
    Could you please help me.
    Thanks in advance.
    Amit

    Hi Amit,
    Please check this thread.
    Re: UNZIP file from ABAP
    Hope this will help.
    Regards,
    Ferry Lianto
    Message was edited by: Ferry Lianto

  • Cannot use winzip to unzip the zip file zipped by java.util.zip

    Hi all,
    I use the followcode to create a zip file, and i downlaod it and try to use winzip to unzip this file but fail. The path is correct and i got the zip file. but it just cannot unzip.
    pls help
    thanks alot.
    Kin
              int count = 0;
              count = ContentDocuments.size();
              for (int i = 0; i < bb; i++)     {
                   System.out.println(filenames[i] + "");
              // Create a buffer for reading the files
              byte[] buf = new byte[10*1024*1024];
              try {      
                   String outFilename = MyDir + "zipfile/" + getContentID2()+".zip";
                   System.out.println("outFilename = " + outFilename);
                   ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
                   for (int i=0; i<filenames.length; i++) {           
                        FileInputStream in = new FileInputStream(filenames);
                        out.putNextEntry(new ZipEntry(filenames[i]));
                        int len;
                        while ((len = in.read(buf)) != -1) {               
                             out.write(buf, 0, len);
                        out.closeEntry();
                        in.close();
                   out.close();
              } catch (IOException e)     {
                   System.err.println("zipprocess " + e.getMessage());

    I've written a replacement zip file creator class. Not much tested but it seems to work, however I've yet to try it with the version of WINZIP that rejected my previous attempts. Oh, and the stored dates are garbage.
    * ZipOutputFile.java
    * Created on 25 March 2004, 13:08
    package zip;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    * <p>Creates a ZIP archive in a file which WINZIP should be able to read.</p>
    * <p>Unfortunately zip archives generated by the standard Java class
    * {@link java.util.zip.ZipOutputStream}, while adhering to PKZIPs format specification,
    * don't appear to be readable by some versions of WinZip and similar utilities. This is
    * probably because they use
    * a format specified for writing to a non-seakable stream, where the length and CRC of
    * a file is writen to a special block following the data. Since the length of the binary
    * date is unknown this makes an archive quite complicated to read, and it looks like
    * WinZip hasn't bothered.</p>
    * <p>All data is Deflated. Close completes the archive, flush terminates the current entry.</p>
    * @see java.util.zip.ZipOutputStream
    * @author  Malcolm McMahon
    public class ZipOutputFile extends java.io.OutputStream {
        byte[] oneByte = new byte[1];
        java.io.RandomAccessFile archive;
        public final static short DEFLATE_METHOD = 8;
        public final static short VERSION_CODE = 20;
        public final static short MIN_VERSION = 10;
        public final static int  ENTRY_HEADER_MAGIC = 0x04034b50;
        public final static int  CATALOG_HEADER_MAGIC = 0x02014b50;
        public final static int  CATALOG_END_MAGIC = 0x06054b50;
        private final static short DISC_NUMBER = 0;
        ByteBuffer entryHeader = ByteBuffer.wrap(new byte[30]);
        ByteBuffer entryLater = ByteBuffer.wrap(new byte[12]);
        java.util.zip.CRC32 crcAcc = new java.util.zip.CRC32();
        java.util.zip.Deflater def = new java.util.zip.Deflater(java.util.zip.Deflater.DEFLATED, true);
        int totalCompressed;
        long MSEPOCH;
        byte [] deflateBuf = new byte[2048];
        public static final long SECONDS_TO_DAYS = 60 * 60 * 24;
         * Entry stores info about each file stored
        private class Entry {
            long offset;        // position of header in file
            byte[] name;
            long crc;
            int compressedSize;
            int uncompressedSize;
            java.util.Date date;
             * Contructor also writes initial header.
             * @param fileName Name under which data is stored.
             * @param date  Date to label the file with
             * @TODO get the date stored properly
            public Entry(String fileName, java.util.Date date) throws IOException {
                name = fileName.getBytes();
                this.date = date == null ? new java.util.Date() : date;
                entryHeader.position(10);
                putDate(entryHeader);
                entryHeader.putShort(26, (short)name.length);
                offset = archive.getFilePointer();
                archive.write(entryHeader.array());
                archive.write(name);
                catalog.add(this);
                crcAcc.reset();
                totalCompressed = 0;
                def.reset();
             * Finish writing entry data. Save the lenghts & crc for catalog
             * and go back and fill them in in the entry header.
            public void close() throws IOException {
                def.finish();
                while(!def.finished())
                    deflate();
                entryLater.position(0);
                crc = crcAcc.getValue();
                compressedSize = totalCompressed;
                uncompressedSize = def.getTotalIn();
                entryLater.putInt((int)crc);
                entryLater.putInt(compressedSize);
                entryLater.putInt(uncompressedSize);
                long eof = archive.getFilePointer();
                archive.seek(offset + 14);
                archive.write(entryLater.array());
                archive.seek(eof);
             * Write the catalog data relevant to this entry. Buffer is
             * preloaded with fixed data.
             * @param buf Buffer to organise fixed lenght part of header
            public void writeCatalog(ByteBuffer buf) throws IOException {
                buf.position(12);
                putDate(buf);
                buf.putInt((int)crc);
                buf.putInt(compressedSize);
                buf.putInt(uncompressedSize);
                buf.putShort((short)name.length);
                buf.putShort((short)0);  // extra field length
                buf.putShort((short)0);  // file comment length
                buf.putShort(DISC_NUMBER);  // disk number
                buf.putShort((short)0); // internal attributes
                buf.putInt(0);      // external file attributes
                buf.putInt((int)offset); // file position
                archive.write(buf.array());
                archive.write(name);
             * This writes the entries date in MSDOS format.
             * @param buf Where to write it
             * @TODO Get this generating sane dates
            public void putDate(ByteBuffer buf) {
                long msTime = (date.getTime() - MSEPOCH) / 1000;
                buf.putShort((short)(msTime % SECONDS_TO_DAYS));
                buf.putShort((short)(msTime / SECONDS_TO_DAYS));
        private Entry entryInProgress = null; // entry currently being written
        private java.util.ArrayList catalog = new java.util.ArrayList(12);  // all entries
         * Start a new output file.
         * @param name The name to store as
         * @param date Date - null indicates current time
        public java.io.OutputStream openEntry(String name, java.util.Date date) throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            entryInProgress = new Entry(name, date);
            return this;
         * Creates a new instance of ZipOutputFile
         * @param fd The file to write to
        public ZipOutputFile(java.io.File fd) throws IOException {
            this(new java.io.RandomAccessFile(fd, "rw"));
         * Create new instance of ZipOutputFile from RandomAccessFile
         * @param archive RandomAccessFile
        public ZipOutputFile(java.io.RandomAccessFile archive) {
            this.archive = archive;
            entryHeader.order(java.nio.ByteOrder.LITTLE_ENDIAN);  // create fixed fields of header
            entryLater.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            entryHeader.putInt(ENTRY_HEADER_MAGIC);
            entryHeader.putShort(MIN_VERSION);
            entryHeader.putShort((short)0);  // general purpose flag
            entryHeader.putShort(DEFLATE_METHOD);
            java.util.Calendar cal = java.util.Calendar.getInstance();
            cal.clear();
            cal.set(java.util.Calendar.YEAR, 1950);
            cal.set(java.util.Calendar.DAY_OF_MONTH, 1);
    //        def.setStrategy(Deflater.HUFFMAN_ONLY);
            MSEPOCH = cal.getTimeInMillis();
         * Writes the master catalogue and postamble and closes the archive file.
        public void close() throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            ByteBuffer catEntry = ByteBuffer.wrap(new byte[46]);
            catEntry.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            catEntry.putInt(CATALOG_HEADER_MAGIC);
            catEntry.putShort(VERSION_CODE);
            catEntry.putShort(MIN_VERSION);
            catEntry.putShort((short)0);
            catEntry.putShort(DEFLATE_METHOD);
            long catStart = archive.getFilePointer();
            for(java.util.Iterator it = catalog.iterator(); it.hasNext();) {
                ((Entry)it.next()).writeCatalog(catEntry);
            catEntry.position(0);
            catEntry.putInt(CATALOG_END_MAGIC);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort((short)catalog.size());
            catEntry.putShort((short)catalog.size());
            catEntry.putInt((int)(archive.getFilePointer() - catStart));
            catEntry.putInt((int)catStart);
            catEntry.putShort((short)0);
            archive.write(catEntry.array(), 0, catEntry.position());
            archive.setLength(archive.getFilePointer());  // truncate if old file
            archive.close();
            def.end();
         * Closes entry in progress.
        public void flush() throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            entryInProgress.close();
            entryInProgress = null;
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(byte[] b) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b);
            def.setInput(b);
            while(!def.needsInput())
                deflate();
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(int b) throws IOException{
            oneByte[0] = (byte)b;
            crcAcc.update(b);
            write(oneByte, 0, 1);
         *  Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
         * @param off Start offset
         * @param len Byte count
        public void write(byte[] b, int off, int len) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b, off, len);
            def.setInput(b, off, len);
            while(!def.needsInput())
                deflate();
        * Gets a buffer full of coded data from the deflater and writes it to archive.
        private void deflate() throws IOException {
            int len = def.deflate(deflateBuf);
            totalCompressed += len;
            if(len > 0)
                archive.write(deflateBuf, 0, len);

  • Can not unzip the zip file of AIR 3.4 beta2 sdk for windows

    http://labsdownload.adobe.com/pub/labs/flashplatformruntimes/air3-4/air3-4_p2_sdk_win_0807 12.zip
    the file can not be unzip.

    Could you please try again, it's fixed now, Apologies for the inconvenience.
    -Thanks
    Pahup

  • Hello, I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    Can you describe what “the operation is failing” means?  What is happening and how is it different than what you expect?
    Also, what product are you trying to update manually, and do you have a link to the page of instructions, so we know what your attempting to do?

  • A strange problem using the zip files

    I'm currently working on a university project with another student in which we use zip files (using the java ZipFile , and ZipOutputStream classes), we write certain data to a zip file (and verify that it is there by checking the disk). and later we read the zip file, and write it back , appending some data at the end of the file.
    although we see the changes actually take place on the disk , in one of the cases when reading the data we don't see the data we have appended before (although it is physically written on the disk).
    testing has revealed that this has something to do with the rename command or java being unsynchronized with the data actually on the disk (caching problem?).
    we use this code to preform the process:
    ZipFile zf= new ZipFile( ((Integer)lexicon.get(keyword)).intValue()+".zip");
              BufferedInputStream input= new BufferedInputStream(zf.getInputStream(new ZipEntry("data")));
              // create a temporary new zip file.
              ZipOutputStream zipst= new ZipOutputStream(new FileOutputStream( ((Integer)lexicon.get(keyword)).intValue()+".tmp.zip"));
              BufferedOutputStream output =new BufferedOutputStream(zipst);
              zipst.putNextEntry(new ZipEntry("data"));
              // stream the contents of the old file into the new file
              //(we do it this way because of the inability of the java zip file interfaces to add to an existing zip file)
              int current = input.read();
              while(current!=-1){
              output.write(current);
              current = input.read();
              output.write(entry.getBytes(false)); // add the new entrys.
              output.flush();
              zipst.closeEntry();
              output.close();
              // erase the old file.
              File toErase = new File( ((Integer)lexicon.get(keyword)).intValue()+".zip");
              toErase.delete();
              // rename the temporary file to the old files name.
              File toRename = new File( ((Integer)lexicon.get(keyword)).intValue()+".tmp.zip");
              toRename.renameTo(new File( ((Integer)lexicon.get(keyword)).intValue()+".zip"));
    we use:
    1. j2sdk 1.4.2_05
    2. running under libranet linux.
    any help will be appreciated

    the data does indeed get lost in the course fo rewriting the file, e assume this is some sort of synchronization issue with java and the file system.
    addig enteies to an existing zip file would have been great, if we had it a few weeks ago , we had to make do without this ability , and all of the code is already written and mostly working (except for the problem I mention) and we don't really want to rewrite the zip file access.
    additional testing has shown that the data gets lost when we use the rename command.
    very strange...
    thanks for the input

  • Unzip issue: Could not delete the zip file after unzip it

    I have issue with the following code, the purpose is to unzip first then delete the zip file. But I could not delete the zip file. When I put a break point before my delete() call, I manually delete it and get the file is used by another process. Please help. Here is my code;
    try{
    File primeZip = new File(dir, fileName);
    ZipInputStream zipStream = new ZipInputStream(new FileInputStream(primeZip));
         ZipFile zf = new ZipFile(primeZip);
         OutputStream out = null;
         for (Enumeration em = zf.entries(); em.hasMoreElements();){
              String fileName = em.nextElement().toString();
              out = new FileOutputStream(fileName );
              byte[] buf = new byte[16384];
              int len;
              while ((len = zipStream.read(buf)) > 0) {
                   out.write(buf, 0, len);
              out.flush();
              out.close();
         out.flush();
                   out.close();
                   zipStream.close();
    primeZip.delete();
    }catch(FileNotFoundException e){          
    }catch(IOException e){         
    }

    I put close() for ZipFile object which is zf.close() befoer I delete the zip file resolve this issue.
    Thanks.

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Cannot unzip the image file from Sun

    I have downloaded the first compressed install CD image file from Sun. But it cannot be unzip. I used almost all of the unzip software(such as Winzip, WinRAR, PKUNZIP for DOS and for Windows).
    Anybody can help me?

    OK! I downloaded for the 5th time without using GetRight and I can now unzip the file in question. For some reason GetRight chokes on this zip file only. All of the other images were downloaded using GetRight and they unzipped just fine. Go figure...
    My reccomendation to anyone else using a download tool like GetRight and having the same problem is to disabled the tool temporarily and just do a normal download through your browser.
    Hope someone finds this useful.
    Bob C.
    Make that another ditto!!! I have downloaded the
    first CD image for x86 Solaris 4 times now. Each time
    the download has succeeded without error, but I can
    not open the zip file. I have been using GetRight 4.3
    to do the download rather than straight FTP or HTTP so
    maybe this is the issue, but I have never had a
    problem using this tool before.
    Help anyone!?!?!?!
    Bob C

  • I purchased creative lightroom presets. I see the zip file in my download file and I try to import to LR but it just keeps creating a bundle never giving me the option to import (greyed out). What am I doing wrong?

    I purchased creative lightroom presets. I see the zip file in my download file and I try to import to LR but it just keeps creating a bundle never giving me the option to import (greyed out). What am I doing wrong?

    Try unzipping the file first. I have no idea regarding your level of technical expertise so advanced apologies if this is really basic. A ZIP file is a compressed file containing one of more files within it. To access the files you will need to expand it. If you double-click on it first, it should open up for you. If it does not automatically expand, you can select the files and copy them to a new folder. The copy will unload them into an uncompressed form. Once they have been uncompressed, you should be able to import them.
    If the import is still giving you problems, go to your Preferences, click on the Presets tab and click the Show Presets Folder button. You can then copy your purchased presets into the folder shown. You will want to copy them to the User Presets subfolder.

  • Unzip a zip file

    Can someone help me for the following problem,
    Iam downloading a zip file from the server to the client.i want to unzip and execute the .EXE file, which is inside the zip file through the java coding.can any one help me!
    thanking you

    I think you can do all of this using the Java runtime interface which allows you to execute command line commands via Java code (ie, launching an EXE).
    See http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    I don't believe there is a component of the Java API that allows you to unzip a zip file. But you could still accomplish this using the winzip command line support. See http://www.winzip.com/wzcline.htm in combination with the Java runtime.

  • To upload the ZIP file and get the filenames available in ZIP file in ABAP

    Hi Experts,
    For my requirement, file from legacy comes as ZIP file with number of files in that.
    Please provide one code sample to upload the ZIP file from local workstation and get the filenames available in ZIP file to check few filename validation checks for the available files in report program.
    Thanks in Advance,
    Regards,
    Basani

    1. Copy the ZIP file into App server
    2. Call function
      call function 'RFC_REMOTE_PIPE'
        destination 'SERVER_EXEC'
        exporting
          command = command  " Unzip command gunzip /path & file
          read = 'X'
        tables
          pipedata = std_lines
    then you can read the files and can validate the file names

  • Problem in tutorial and zip file. can anyone file it or correct it..

    hi jdev experts,
    am using jdev11.1.1.5.0.
    when am new to these webservice. i followed this tutorial
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_14/jdtut_11r2_14.html
    url wsdl link when use that wsdl.
    throws some error.
    what is the reason john says. ok at second post of the thread.
    Consuming a Web Service from a Web Page
    so if i change the wsdl means and somethings has to be changed in tutorial steps.
    if any newbie crossing this tutorials feels very difficult to work. so can change the wsdl url link and those steps.
    and another thing I installed 11.1.2.0 and download that zip file in that tutorial and i run throws the same error.
    so. problem in tutorial and zip file. can anyone file or correct..
    i think think this is the right place to tell this. or else re-direct me.

    this is to arun.
    As the exception stack clearly mentions that the endpoint is moved, it is up to the users to make use of any other webservice.trace says link is moved i know.
    thing am here is:
    please make note on that tutorials.
    * note :- just like this consume some other external webservices. dont use this webservice this webservices link is broken.
    this what saying.
    this to john.
    thanks. thanks again.

  • How to store the zip file in oracle table?

    hi,
    How to store the zip file in oracle table ?
    is it possible to unzip and read the file ?
    Thanks
    Rangan S

    SQL> DESC BLOB_TABLE;
    Name Type Nullable Default Comments
    A INTEGER Y
    B BLOB Y
    SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
    ORA-00904: "BLOB": invalid identifier
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
    ORA-00907: missing right parenthesis
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
    ORA-01465: invalid hex number
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));

Maybe you are looking for

  • AMD HD Radeon 6310 - 1080p Video flickering only in browser

    Hello All, I just got my Lenovo Thinkpad 120E with AMD HD Radeon 6310 card. I am able to play youtube videos of 1080p resolution and video files of full HD / Bluray resolutions if I play through VLC or one of those std video players.  But playing 108

  • How to search the contents of emlx files in 10.7 Lion ?

    Hi, Since Apple Mail in 10.7 leaved some messages in a Mail Lost+Found folder it would be nice to find out which of those messages might also exist in the active mailboxes and since Apple Mail cannot import these Lost & Found mails (unless manually o

  • CS6, how do I open files in Bridge directly into Photoshop? [was: Stan Spur]

    CS6, how do I open files in Bridge directly into Photoshop. The default is File Viewer or there is an option to open in Adobe RAW.

  • Where I can find the packages javax.servlet?

    I am using the Jbuilder 5 and I need to do a programm with servlets but it says that it cannot find the javax.servlet although I know it has the package servlet.. ..what can I do?

  • Need of datasource for crm tables

    Hi Friends, I have a list of standard CRM Tables. But i need of the Standard Datasource's based on those standard Tables. The Standard Tables are--- CRMD_ORDERADM_H CRMD_ORDER_INDEX BUT000 BUT100 ADRC ADR2 CDBD_ADRC SMOADRC Could anyone please help m