Welcome to the Xceed Community | Help
Community Search  
More Search Options

Files/Folders missing after unzip

Sort Posts: Previous Next
  •  12-07-2009, 10:41 AM Post no. 25097

    Files/Folders missing after unzip

    I have a .zip file created elsewhere that my app needs to unzip. The archive contains numerous files and folders (the file itself is about 350Mb zipped, 900Mb+ unzipped) of all different sizes and depths. When I have the Xceed component unzip it, everything seems fine, but there are a handful of folders and a couple files that don't get unpacked. The folders are empty folders (though still necessary) but not sure about the files.

     The code I am using (_ArchiveFile and _UnzipFolder are properties set prior to method execution):

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Try

                Cursor = Cursors.WaitCursor

                Dim zip As New ZipArchive(New DiskFile(_ArchiveFile))

                Dim folder As New DiskFolder(_UnzipFolder)

                zip.CopyFilesTo(folder, True, True)


            Catch ex As Exception

                Cursor = Cursors.Default

                Throw New Exception(String.Format("Unzip Failed:{0}{1}", vbCrLf, ex))

            Finally

                Cursor = Cursors.Default

            End Try

        End Sub

     

    What is it I am doing or not doing (right/wrong) that could be causing this? Thanks

     -- Andrew 

  •  12-14-2009, 5:10 PM Post no. 25205 in reply to 25097

    Re: Files/Folders missing after unzip

    Hi Andrew,

    the answer to your question could according to the operating system you are running your application on.  If the application tries to go into a directory that can be seen from 'outside/above' but it does not have the credits (needs to be the owner/an administrator, for example) to read this directory's content, it won't.   In some cases, starting the application using "Run as administrator" could help. 

    As far as I can know, the chances are that the behavior you are seeing is operating system related.  I know that this will sound trivial but when you open the archive to just look at the content, is everything there? 

    There must be a logical explanation behind all this. 


    Ghislain
    Technical Support and software developer
    Xceed Software Inc.
    Knowledge Base : http://xceed.com/kb/
    Update Center : http://xceed.com/updates/
    Documentation Center : http://xceed.com/doc/
    For everything else, there is Google
  •  02-01-2011, 7:21 PM Post no. 29725 in reply to 25205

    Re: Files/Folders missing after unzip

    I have also the same problem. I have zip file of around 600 MB and it contain 31 folders Out of 31 only 1 folder was empty. When I unzip uisng the Xceed component i got only 30 folders and the empty folder was missing. If I unzip manually I got 31 folders.

    Even i execute the program and unzipping manually both under the same user account and the same location.

     Note: If list the folders in the zip file it gave 31 folders.

     Please find the code that used to extarct the file below

    Dim zipFile As New DiskFile(zipFilename)

    If Not zipFile.Exists Then

    Throw New Exception("Zip file does not exists. The file name is " & zipFilename)

    End If

    'Create a ZipArchive object to access the zip file

    Dim zip As New ZipArchive(zipFile)

    'Create a DiskFolder object for the destination folder

    Dim destinationFolder As New DiskFolder(destFolder)

    'Copy the contents of the zip file to the destination folder

    zip.CopyFilesTo(destinationFolder, True, True)

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.