Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Windows ZIP functionality (VB / Windows XP)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Windows ZIP functionality (VB / Windows XP)

    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.

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Windows ZIP functionality (VB / Windows

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Windows ZIP functionality (VB / Windows

    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 <A target="_blank" HREF="http://www.winzip.com/prodpagecl.htm?wzhcli">WinZip

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Access Windows ZIP functionality (VB / Windows

    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?

  6. #6
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Windows ZIP functionality (VB / Windows XP)

    Along the lines of what Hans suggests, you might try a <img src=/S/free.gif border=0 alt=free width=30 height=15> command line tool, like:
    ! Freebyte Zip
    PowerArchiver Command Line 4.01

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

    Alan

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Windows ZIP functionality (VB / Windows

    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. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  8. #8
    Star Lounger
    Join Date
    Jan 2001
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Windows ZIP functionality (VB / Windows XP)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •