0

I am writing a c# application that uses 7-zip to compress a directory. 7-Zip returns an exit status after zipping up a file. In the console window all I see is

Everything is Ok

which equates to an exit code of 0. But does anybody know if there is a way I can get that number?

swolff1978
  • 1,845
  • 7
  • 28
  • 44

1 Answers1

3

I assume you're starting 7-zip as a separate process using the System.Diagnostics.Process class.

From MSDN:

Process.ExitCode Property

Gets the value that the associated process specified when it terminated.


You might be interested in SevenZipSharp which provides a managed wrapper for the 7z.dll.

dtb
  • 213,145
  • 36
  • 401
  • 431