I'm sorry if I post Winzip question here, but I met a problem. I was running Winzip command by using process in VB.Net, but I had error that I don't know how to trace.
1. I create a batch file: "C:/zipbatch.bat" that contains below zip command
winzip32.exe -min -a -ex "C:/zipfile.zip" "C:/sourcefile.csv"
2. I create new a process to run the zip command
Dim t_process As New System.Diagnostics.Process
t_process.StartInfo.FileName = "C:/zipbatch.bat"
t_process.Start()
t_process.WaitForExit()
dim t_iExitCode as Integer = t_process.ExitCode
3. Normally t_iExitCode will return 0 (zero) for a successful run. But I met a condition that the winzip return 0, but in fact it isn't totally successful.
The error message is that...
Winzip failed to rename the temp file into intended name, which is "C:/zipfile.zip"
So it happens that my file has been added to some "C:/ziptempfile.tmp", but then failed to be added to "C:/zipfile.zip"
Is there anybody knows how to detect such kind of condition, since the process returns me "success". For now, I wish I could detect the failure first, so that I can stop my next process. Or if anybody knows how this kind of issue could happen, please tell me. Thanks a lot.