• Access Windows ZIP functionality (VB / Windows XP)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Access Windows ZIP functionality (VB / Windows XP)

    Author
    Topic
    #421743

    If possible, I want to access native Windows XP Zip functions from within Visual Basic. To be more specific, if the compression/decompression/extraction functions are performed by discrete programs, then I’m looking to “SHELL” them as appropriate. Baring that, I’m looking for whatever APIs are available. Or, whatever else I might try.

    Thank you for taking the time to respond.

    John Littell

    Viewing 1 reply thread
    Author
    Replies
    • #959318

      Using Windows XP “Compressed Folder” shell extension to work with .zip files contains vb.net code – perhaps you can adapt it for vb/vba.

      There are several other zip/unzip libraries available.

      • #959331

        HansV, thanks for responding.

        I went to the page your recommended and it said simply ” There’s no API in Windows to work with .zip files but the compressed folder file extension can be used from VB to compress and decompress files in .zip files.” Is this telling me that my only option to Zip and Unzip from within VB/VBA code is to access third party applications?

        I have no problems with buying products. My thoughts were that Windows functions might stay around a while. (What ever happened to ZipMagic? Their web site doesn’t mention it anymore.)

        John Littell

        • #959360

          If – as the site states, as well as some newgroup posts I found – that zipping is not exposed through a Windows API, you’ll have to use third-party solutions, I’m sure there are free ones out there.

          If you have a registered copy of WinZip 9, you can download the free WinZip

        • #959364

          My work computer doesn’t seem to implement Windows XP’s “native” zip functionality, perhaps because WinZip has taken over all the hooks. On my personal laptop, if I recall correctly, there is a right-click operation to create a new zip file. You then compress files into the zip by copying them there. Can you implement that two-step process in VB code?

          • #959418

            If you work with .Net at all, you can use the javascript dll, which does have zip and unzip funtionality. Of course, it is entirely obscure and not what most newsgroups recommend, but is is built into Visual Studio.Net, which none of the other solutions seem to be. shrug

    • #959416

      Along the lines of what Hans suggests, you might try a free command line tool, like:
      ! Freebyte Zip
      PowerArchiver Command Line 4.01

      There is a fairly comprehensive listing on Free compression and uncompression tools.

      Alan

      • #959426

        I’ve played with many zip tools, but all the ones I know of have one serious limitation:
        they can’t zip files that are open in an application, e.g. a document that’s in use
        in Word.
        The ONLY tool that manages to bypass this file lock is the WinZip commandline
        add-on, as mentioned in HansV’s comment above.

    Viewing 1 reply thread
    Reply To: Access Windows ZIP functionality (VB / Windows XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: