
Need to extract files from a ZIP file programmatically using VBScript
Quote:
> I need to extract selected files from a ZIP file programmatically
> using VBScript running in ASP (Active Server Pages) environment. If it
> is not possible to extract selected files it would be Ok if I would
> extract all compressed files.
> It seems like a common task, but I can't find any references or sample
> code. I will very much appreciate any insights. Thank you.
> Misha
I have done this using the wscript.shell object's .run method and
passing it a command string to invoke pkzip25.exe or you can use
winzip8.0 if you have the command line extensions intalled.
dim shell
set shell = createobject("wscript.shell")
cmdstr = "pkzip25" & " -extract" & " myfile.zip"
test = shell.run (cmdstr, 0, true)
if test = 0 then
wscript.echo "success"
end if
Paul Bruno