CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Info-ZIP probs

  1. #1
    Join Date
    Feb 2008
    Posts
    12

    Info-ZIP probs

    Hi, I'm having some difficulties trying to zip functionality to one of my programs. The code Ive been using is replicated in a few places ; Details

    Code:
    Dim oZip as CGZipFiles
    
    set oZip = new CGZipFiles
    
    oZip.ZipFileName = "\MyZip.Zip"
    oZip.AddFile "c:\mystuff\myfiles\*.*"
    oZip.AddFile "c:\mystuff\mymedia\*.wav"
    
    If oZip.MakeZipFile <> 0 then
       MsgBox oZip.GetLastMessage
    End If
    
    set oZip = nothing
    The problem is when i zip up any files they retain their original directory structure inside the zip file, any folders they were inside get zipped up as well.

    Ive seen many people complaining about this problem but i havent seen a working solution yet.

    I got hold of the source code for the 'CGZipLibrary.dll and tried changing this line;
    Code:
    ZOPT.fJunkDir = 1           ' 1 If Junking Directory Names
    but it hasn't made any difference.

    How can i just zip the files not the directories they are contained in?
    Thanks..
    Last edited by vitaloverdose; June 19th, 2008 at 03:08 AM.

  2. #2
    Join Date
    Mar 2006
    Posts
    16

    Smile Re: Info-ZIP probs

    Here is a whole page of tutorials on using the InfoZip DLLs.
    http://datacompression.info/InfoZip.shtml

    Good luck.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured