Re: recursing into subdirectories

"Fred Bone" <Fred.Bone-nj/[email protected]> Thu, 20 Nov 2003 14:46:19 -0000
Newsgroups gmane.comp.archivers.info-zip
Message-ID <3FBCD3BB.15766.3919E1D@localhost>
On 19 Nov 2003 at 15:41, Tim Robinson wrote:

> Hi.
> 
> I would be eternally grateful if someone could point me in the right
> direction for this. I can't find it on the FAQ.
> 
> I am using the info-zip DLLS from visual basic using a wrapper from
> vbaccelerator.com, but I don't think the problem is in the VB code.
> 
> say I have a zip file who's root directory is c:\temp and I want to add the
> 'foo' subdirectory and eveything in it. in my zip file I want to paths to
> look like this
> 
> foo/file1
> foo/subdir/file2
> 
> my pseudocode looks like this:
> 
> let root dir = "c\:temp"
> let recurse subdirectories = true
> let store foldernames = true
> let store directories = true
> add file spec "foo\*.*"
> 
> in the zip file, I just get the contents of the foo directory but no
> subdirectories (in the above example I just get file1 with no directory
> path)
> 
> if I set the file spec to '*.*' everything works fine (except, of course,
> that I get all the other subdirectories of temp when I only want foo)
> 
> I have tried this with winzip and I notice it is possible to do this by
> dragging and dropping but not with the 'add files' dialog. of course, I
> don't know what info-zip calls winzip is making so it doesn't really help me
> much

Disclaimer: I don't use the .DLL (directly, that is).

Your syntax is wrong.

What you are asking it to do is find files called "foo/*.*" in 
c:\temp and its subdirectories. This would match these:
 c:\temp\foo\sample.txt
 c:\temp\bar\baz\foo\read.me
but not
 c:\temp\foo\bar\baz.ini

To do what you want in WiZ you would
- navigate to c:\temp and click "set reference directory"
- navigate to c:\temp\foo
- select "*.*
- click "recurse"
This would zip up c:\temp\foo and all its subdirs, with the recorded 
filenames relative to "c:\temp" i.e. all starting "foo\".

I don't know how to translate this into .DLL-speak, but I'm sure it's 
possible; after all, if WiZ can do it ...