unzipping files

G

Guest

Thanks to Ron's code http://www.rondebruin.nl/zip.htm
i was able to unzip the files.
However, I need little modification and I am new to VB so i am not quiet
sure how to do so.

here's part of my code:
FileNameZip = "N:\Customer Counts\CEN.zip"
FolderName = "N:\Customer Counts\Tag"
FolderName = "N:\Customer Counts\Tag"
ShellStr = PathWinZip & "Winzip32 -min -e" _
& " " & Chr(34) & FileNameZip & Chr(34) _
& " " & Chr(34) & FolderName & Chr(34)
ShellAndWait ShellStr, vbHide

although it is extracting it to " Tag" folder, there are subfolders listed
so actually, it is extracting it to:
N:\Customer Counts\Tag\dwstage\homedirs\reporting\scripts\data_spool
how would I delete the other folders? i want the files to extract to the
"Tag" folder.

Also, if the file already exist, I want it to overwrite it automatically.

Thank you!
 
T

Tom Ogilvy

These would both be a function of the command line arguments you furnish to
Winzip. Just identify what the correct arguments are and put them in the
command string.
 
T

Tom Ogilvy

ShellStr = PathWinZip & "Winzip32 -min -e -o" _
& " " & Chr(34) & FileNameZip & Chr(34) _
& " " & Chr(34) & FolderName & Chr(34)

should overwrite.

As to the path, I believe you would have to build the archive without using
the save path option from what I could see.
 
T

Tom Ogilvy

Actually, while I haven't tested it. I would expect the default to be to
extract without using the path since there is a -d option to tell it to
extract using the path - but since you say it is using the path, that may
not be true.

Also, the help is for the commandline addon - I assume the arguments would
be the same for winzip32 but no guarantee.
 
R

Ron de Bruin

Hi

From the Winzip Help

-o and -j stands for "overwrite existing files without prompting" and "Junk
pathnames", Unless -j is specified,folder information is used
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top