Using Winzip with wScript in Classic ASP

Hi Experts,

I have the below code that I am truing to zip a folder. Locally it works, but when I installs it in the server, first it giving me a general error, which I fixed by giving full permission to the Winzip and downloads folder, but now I get no error and the resulting zip file is not created.

I am using IIS6 and Plesk.

Any feedback would be appreciated.

	Dim oShell
	Set oShell = CreateObject("WScript.Shell")
	winZipPath = "C:\Program Files\Winzip\wzzip.exe"
	confPath = "C:\Inetpub\vhosts\\httpdocs\audio\Downloads\ABC0034860"
	cmd = chr(34) & winZipPath & chr(34) & " -p -r " & confPath & ".zip " & confPath
	oShell.Run cmd, , True 
	fso.DeleteFolder confPath, True
	Set oSshell = Nothing

Open in new window

APD TorontoAsked:
Who is Participating?
I've been using free ZIP component for a while now; it looks easier to work with than WinZip. Can you try that instead?

Set Zip = Server.CreateObject("XStandard.Zip")
confPath = "C:\Inetpub\vhosts\\httpdocs\audio\Downloads\ABC0034860"
Zip.Pack confPath, confPath & "zip"
Set Zip = Nothing

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.