Re: createing subdirs in a compressed folder (zip)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"OLE object may be corrupt"

And its implementation





"Carl Karsten" <carl@xxxxxxxxxxxxxxxxx> wrote in message
news:OrxLtEmNGHA.2472@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to zip a bunch of files that are in different dirs. I can't
figure
out how to save the path in the zip (like the pkzip -rp option.)

Here is what I am starting with and the error I get:

objShell = CreateObject("Shell.Application")

lcCurDir = FullPath("")

* normal dir:
objFolder = objShell.NameSpace( lcCurDir )
objFolder.NewFolder("TestFolder")

*-- Create the zip file
Erase "test.zip"
lcZipFile = Chr(80) + Chr(75) + Chr(5) + Chr(6) + Replicate(Chr(0), 18)
Strtofile( lcZipFile, "test.zip", 0 )

* Zip Dir
oZip = objShell.NameSpace( FullPath( "test.zip" ) )
oZip.NewFolder("TestFolder")

&& Error# 1440, "OLE exception error: Exception code c0000005. OLE object
may be
corrupt"


So, how do I create subdirs inside a zip file?

and is this the best place to ask?

^Carl Karsten

.