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
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.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
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;
but it hasn't made any difference.Code:ZOPT.fJunkDir = 1 ' 1 If Junking Directory Names
How can i just zip the files not the directories they are contained in?
Thanks..




Reply With Quote