Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I use shell function to call winzip to unzip file. My problem is I want it to show error if it get error such as the file that it try to open is not .zip.

This is my code :

procID = Shell("C:\Program Files\Winzip\Winzip32.exe -min -e -o -s c:\Temp\Myfile.Zip c:\Temp, , True)

 

At the moment the error message that I got is from winzip itself.

  • *Experts*
Posted
There is really no reliable way to do this. You can either let Winzip handle it as is happening now, or use a free zip library (there are a few out there, I think) to unzip things yourself. That way the errors will be internal to your program and no external shelling is needed. Shelling to an external program in a hard-coded place is fairly bad practice anyway.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...