Skip to main content
Participant
March 26, 2009
Question

CFZIP can't unzip FTP'd file

  • March 26, 2009
  • 1 reply
  • 546 views
When I try to unzip a zip file that was FTP'd to my server I get an error:

Ensure that the file is a valid zip file and it is accessible. Cause : java.util.zip.ZipException: error in opening zip file

I can open the zip file through windows with no issue so this has to do with what CF uses to open the file. I also extracted the files in the zip file and then created a new zip file on my own and CF can unzip that file fine as well.

Does ftp'ing a file cause some kind of change with the file that would cause the exception?
    This topic has been closed for replies.

    1 reply

    Inspiring
    March 26, 2009
    jsg1000 wrote:
    > When I try to unzip a zip file that was FTP'd to my server I get an error:
    >
    > Ensure that the file is a valid zip file and it is accessible. Cause :
    > java.util.zip.ZipException: error in opening zip file
    >
    > I can open the zip file through windows with no issue

    Did you open the exact file that was FTP'd to your server or the initial
    file ? FTP files can be transferred in 2 modes: ascii and binary there
    is a possibility that the files was transferred in ascii and thus corrupted.

    > Does ftp'ing a file cause some kind of change with the file that would cause
    > the exception?

    It might be. Read about the ascii/binary mode for a ftp transfer for
    more info.

    --
    Mack