No announcement yet.

Problems adding/modifying/deleting files in ZIP archives

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems adding/modifying/deleting files in ZIP archives

    I have used BeyondCompare for years and never had difficulties comparing ZIP archives against a folder or two zip archives agains each other.

    Since upgrading to release 3.0.10 Build 9357 I constantly get the following error message when trying to add/remove/modify files in a ZIP archive:

    2008-12-02 08:49:34 Unable to delete early_install: Cannot open file "C:\". The process cannot access the file because it is being used by another process

    If I then retry, everything works but if I try to delete say 10 directories including their files from a ZIP archive, I have to retry 10 times which is very annoying.

    Is this a known problem?

    The ZIP files in question have been created using Winzip 8.1, TotalCommander 7.02a or BeyondCompare itself. It does not seem to matter which tool I used to create the ZIP files. I am working under an english language Windows Vista 32-bit.

    Is there any other way to get this working again except for downgrading to a previous build?

    Thanks for any help.


  • #2
    Could you use a program like Process Explorer to see which application is locking your zip and when the lock occurs?
    Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more.

    That may give us more information on what is happening.
    Aaron P Scooter Software


    • #3
      Hi Urs,

      The new release (3.0.12) has a lot of zip related fixes. Let us know if you still see this issue after upgrading.
      Zoë P Scooter Software


      • #4
        I'm having issues with .zip files in 3.1.2. When I create an empty .zip file and then use BC3 to copy a folder into that archive, BC3 says everyting is fine. If I try to open the archive with BC2, I get an exception. If I try to open the archive with the Windows XP compressed file Explorer tool, it asks me for the password on files as it starts to extract them. There is no password on the archive.

        When I copy the folder into the .zip using BC2, I can access the resultant archive with BC2, BC3, WinZip or Explorer Compressed file tool with no problems.

        The exception in BC2 is Beyond Compare Version 2.5.3 (build 253) Exception occured at: 0021FEC3 Access violation at address 043B0EC3 in module 'BC2.exe'. Read of address 00000008.

        We have some team members not yet confident about BC3 so still using BC2.
        Last edited by casner; 21-Apr-2009, 05:18 PM.


        • #5

          What program are you using to create your empty zip? Both BC3 and WinRar create empty zips that function fine after copying an empty folder into them (either aligned subfolder, or when the zip is set to a base folder).

          Also, are you setting the zip as the base folder before copying into it, aligning it to another zip/folder to copy into it as a subfolder to a base folder, or using the Copy To Folder command? Or another method of moving an empty folder inside?
          Last edited by Aaron; 21-Apr-2009, 06:12 PM. Reason: additional questions
          Aaron P Scooter Software


          • #6
            Our IT installed WinZip on my computer, so by default that is what takes over zip file processing, including creation of new empty zips. Does BC3 use whatever zip engine is the default on a given machine? When I use BC2 to fill the zip, the original empty zip file is still created with WinZip, so that shouldn't be the difference.

            I am creating the empty zip file with the name I need, then setting it as a base folder on one side and my working folder as a base folder on the other side. Then I just copy everything from the working folder into the zip by select all and using the synchronize arrow.


            • #7
              I can reproduce the access violation in BC2.5.2 if the zip file contains subfolders:

              If I add an empty subfolder with BC3, BC2 doesn't show the subfolder.
              If I add a file to that subfolder (BC3 or WinZip), BC2 gets an access violation.
              If I delete that file, BC2 doesn't show the subfolder again.
              If I add a file to a subfolder created with BC2 or WinZip, BC2 shows the file.
              WinZip 9.0 shows all combinations but (of course?) not an empty subfolder.


              • #8
                Thank you for helping to clarify this. I have several folders and files that I am transferring into my zip file, but you have simplified this to something that can be tested more easily.


                • #9
                  BC3 creates zips if you use the Move or Copy to Folder command, which brings up the Copy to Folder dialog, in which you can type in a folder path. This path can be to a zip, which if it does not exist, BC3 will create.

                  Could you go into more detail on how you use BC3 to create the zip? If it is with the Explorer Context menu, then that is just the Explorer Right click menu, which would probably be using WinZip for you. Which version of Winzip are you running?

                  How are the tests in general running?
                  Aaron P Scooter Software


                  • #10
                    BC2 cannot handle BC3-generated subfolders in zip-files (neither copy files into empty subfolders nor read the entire zip-file with non-empty BC3-generated subfolder).

                    There's no difference what application (BC2/BC3/WinZip) initially created the zip-file or put a file to the BC3-generated subfolder.


                    • #11
                      I have been creating the initial archive using Windows Explorer, not inside BC. I copy the name from one of my recent archives, right click in the Explorer window, and pick New/WinZip file. I paste the name of the old archive and change it as appropriate. This creates an empty .zip file. I then right click on it and select this as the left folder or left side (BC3 or 2), then right click on my folder and Compare To from the BC submenu. It actually doesn't seem to matter if the archive file is created with Windows Compressed Folder or WinZip. The difference is BC2 or BC3. My WinZip version is 12.0 Pro, though.

                      The test described by Lutz is very simple and definitive. It duplicates the issue I have had.


                      • #12
                        I've tracked this down and it was an unintential change it behavior in 3.1, related to the other zip enhancements we've done. It will be fixed in the next release. The BC3 generated zips are perfectly valid; the difference is that BC2 is expecting paths for directories to have a trailing '/' character and can crash if it isn't there.
                        Zoë P Scooter Software


                        • #13
                          Thanks Craig. There was concern here whether the archives were really okay, and this answers that question.