dcsimg
Results 1 to 2 of 2

Thread: Get List of Zip Contents

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,633

    Get List of Zip Contents

    The zlibwapi.dll is a stdcall library that combines Zlib and MiniZip.

    See Minizip: Zip and UnZip additionnal library.


    This demo shows how to make some of its "unzip" calls to get a directory listing of a Zip archive's contents without extracting the contents as files. To test the demo you'll need some version of zlibwapi.dll, the more recent the better but version 1.2.3 or newer probably have both libraries compiled into the DLL.

    The program source attachment includes a test file "sample.zip" that it is hard-coded to list as a demo:

    Code:
        Dim Path As String
    
        With New MiniZipDir
            .OpenZip App.Path & "\sample.zip"
            Path = .FirstFile()
            Do While Len(Path)
                Text1.SelText = Path & vbNewLine
                Path = .NextFile()
            Loop
            .CloseZip
        End With
    Name:  sshot.png
Views: 125
Size:  2.4 KB

    See the comments in MiniZipDir.cls for more information.

    Of course you could just use Shell Automation objects to do the same sort of thing.
    Attached Files Attached Files

  2. #2
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    371

    Re: Get List of Zip Contents

    Quote Originally Posted by dilettante View Post
    The zlibwapi.dll is a stdcall library that combines Zlib and MiniZip.

    See Minizip: Zip and UnZip additionnal library.


    This demo shows how to make some of its "unzip" calls to get a directory listing of a Zip archive's contents without extracting the contents as files. To test the demo you'll need some version of zlibwapi.dll, the more recent the better but version 1.2.3 or newer probably have both libraries compiled into the DLL.

    The program source attachment includes a test file "sample.zip" that it is hard-coded to list as a demo:

    Code:
        Dim Path As String
    
        With New MiniZipDir
            .OpenZip App.Path & "\sample.zip"
            Path = .FirstFile()
            Do While Len(Path)
                Text1.SelText = Path & vbNewLine
                Path = .NextFile()
            Loop
            .CloseZip
        End With
    Name:  sshot.png
Views: 125
Size:  2.4 KB

    See the comments in MiniZipDir.cls for more information.

    Of course you could just use Shell Automation objects to do the same sort of thing.
    Collection to the my code base

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width