Get error from Shell function

Angelus

Newcomer
Joined
Nov 12, 2003
Messages
16
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.
 
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.
 
Back
Top